File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -220,22 +220,22 @@ def latency(self) -> str:
220
220
221
221
@property
222
222
def intended_use (self ) -> str :
223
- """Get dataset intended use."""
223
+ """Get dataset intended use path ."""
224
224
level = self .processing_info .level
225
225
collection_type = self .processing_info .collection_type
226
226
data_centers = self .processing_info .data_centers
227
227
228
228
if level == "4" and collection_type == "SCIENCE_QUALITY" :
229
- return "exploration"
229
+ return "Path A" # maps to " exploration"
230
230
231
231
if (
232
232
(level in ["2" , "2a" , "2b" ] and "SEDAC" in data_centers and collection_type == "SCIENCE_QUALITY" )
233
233
or (level in ["3" , "3a" ] and collection_type == "SCIENCE_QUALITY" )
234
234
or (level == "4" and collection_type != "SCIENCE_QUALITY" )
235
235
):
236
- return "basic analysis"
236
+ return "Path B" # maps to " basic analysis"
237
237
238
- return "advanced analysis"
238
+ return "Path C" # maps to " advanced analysis"
239
239
240
240
@property
241
241
def geographic_coverage (self ) -> str :
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ class TestProcessingLevelInfo:
220
220
def test_intended_use_exploration (self ):
221
221
data = {"umm" : {"ProcessingLevel" : {"Id" : "4" }, "CollectionDataType" : "SCIENCE_QUALITY" }}
222
222
dataset = CmrDataset (data )
223
- assert dataset .intended_use == "exploration "
223
+ assert dataset .intended_use == "Path A "
224
224
225
225
def test_intended_use_basic_analysis (self ):
226
226
data = {
@@ -231,7 +231,19 @@ def test_intended_use_basic_analysis(self):
231
231
}
232
232
}
233
233
dataset = CmrDataset (data )
234
- assert dataset .intended_use == "basic analysis"
234
+ assert dataset .intended_use == "Path B"
235
+
236
+ def test_intended_use_advanced_analysis (self ):
237
+ # Added this test to cover Path C case
238
+ data = {
239
+ "umm" : {
240
+ "ProcessingLevel" : {"Id" : "2" },
241
+ "CollectionDataType" : "SCIENCE_QUALITY" ,
242
+ "DataCenters" : [{"ShortName" : "OTHER" }],
243
+ }
244
+ }
245
+ dataset = CmrDataset (data )
246
+ assert dataset .intended_use == "Path C"
235
247
236
248
def test_latency_mapping (self ):
237
249
data = {"umm" : {"CollectionDataType" : "NEAR_REAL_TIME" }}
You can’t perform that action at this time.
0 commit comments