Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ARGO/oceancurrent/oceancurrent_file_server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,17 @@ def _load_api_endpoint():
"region_layer": 3,
"max_layer": 3,
"save_in_product_folder": True
},
{
"productId": "swotGsla-ssh",
"include": [
{"path": "DR_SWOT", "layer": 1},
{"path": "^SSH$", "layer": 2},
{"path": "^(AlbEsp|Bass|Brisbane2|CGBR|CLeeu|GoC|Indo|JBGulf|Kimberley|LordHoweS|NGBR|NWS|Ningaloo|Perth|RechEyre|Rowley|SAgulfs|SGBR|SNSW|Tas|Au)$", "layer": 3}
],
"filetype": ".gif",
"region_layer": 3,
"max_layer": 3
}
]

Expand Down
29 changes: 29 additions & 0 deletions ARGO/oceancurrent/test_oceancurrent_file_server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,30 @@ def prepare_test_cases(self):
]
}
],
"swotGsla-ssh": [
{
"path": "/DR_SWOT/SSH/Au",
"productId": "swotGsla-ssh",
"region": "Au",
"depth": None,
"files": [
{
"name": "20260426223317.gif"
}
]
},
{
"path": "/DR_SWOT/SSH/Tas",
"productId": "swotGsla-ssh",
"region": "Tas",
"depth": None,
"files": [
{
"name": "20260424190628.gif"
}
]
}
],
}

def load_and_normalize_json(self, file_path):
Expand Down Expand Up @@ -493,6 +517,11 @@ def test_file_structure_explorer(self):
self.verify_json("tidalCurrents-sl", "tides", "tidalCurrents-sl")
self.verify_json("tidalCurrents-monthplots", "tides", "tidalCurrents-monthplots")
self.verify_json("EACMooringArray", "EAC_array_figures", "EACMooringArray")
self.verify_json("swotGsla-ssh", "DR_SWOT/SSH", "SSH")
# Verify unrelated directories under DR_SWOT/SSH are excluded by the region whitelist
swot_json_path = os.path.join(self.file_test_dir, "DR_SWOT", "SSH", "SSH.json")
swot_regions = {item["region"] for item in self.load_and_normalize_json(swot_json_path)}
self.assertNotIn("archive", swot_regions, "Unrelated directory 'archive' should not be indexed")
# Verify no JSON file required if no gif files listed
not_existed_path = os.path.join(self.file_test_dir, "timeseries", "currentMetersCalendar-48.json")
self.assertFalse(os.path.exists(not_existed_path))
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading