From 2105c016370ebb675834a3be82e6a53d6d6f22b2 Mon Sep 17 00:00:00 2001 From: Weite Dai Date: Tue, 20 Jan 2026 11:56:03 +1100 Subject: [PATCH 1/2] feat(oceancurrent): add non tidal and month plot products --- .../oceancurrent_file_server_api.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ARGO/oceancurrent/oceancurrent_file_server_api.py b/ARGO/oceancurrent/oceancurrent_file_server_api.py index 0a394dcb..3e09af88 100644 --- a/ARGO/oceancurrent/oceancurrent_file_server_api.py +++ b/ARGO/oceancurrent/oceancurrent_file_server_api.py @@ -369,6 +369,16 @@ def _load_api_endpoint(): "region_layer": 3, "max_layer": 3, }, + { + "productId": "adjustedSeaLevelAnomaly-nonTidalSla", + "include":[ + {"path": "STATE_daily", "layer": 1}, + {"path": "^NTSLA$", "layer": 2} + ], + "filetype": ".gif", + "region_layer": 3, + "max_layer": 3, + }, { "productId": "adjustedSeaLevelAnomaly-centiles", "include":[ @@ -472,6 +482,16 @@ def _load_api_endpoint(): "max_layer": 3, "save_in_product_folder": True }, + { + "productId": "tidalCurrents-monthplots", + "include": [ + {"path": "tides", "layer": 1}, + {"path": "monthplots", "layer": 2} + ], + "filetype": ".gif", + "max_layer": 2, + "save_in_product_folder": True + }, { "productId": "EACMooringArray", "include": [ From 78bb53ef609988a9ce3bff9b506c8da57a407b64 Mon Sep 17 00:00:00 2001 From: Weite Dai Date: Tue, 20 Jan 2026 11:58:40 +1100 Subject: [PATCH 2/2] test(oceancurrent): add unit tests and mock gif for new products --- .../test_oceancurrent_file_server_api.py | 31 +++++++++++++++++++ .../STATE_daily/NTSLA/Au/2026011812.gif | 0 .../STATE_daily/NTSLA/Au/2026011818.gif | 0 .../tides/monthplots/CSIRO_28064_198712.gif | 0 .../tides/monthplots/CSIRO_28072_202101.gif | 0 .../tides/monthplots/NTC_Y_island_202512.gif | 0 6 files changed, 31 insertions(+) create mode 100644 ARGO/oceancurrent/tests/mnt/oceancurrent/website/STATE_daily/NTSLA/Au/2026011812.gif create mode 100644 ARGO/oceancurrent/tests/mnt/oceancurrent/website/STATE_daily/NTSLA/Au/2026011818.gif create mode 100644 ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/CSIRO_28064_198712.gif create mode 100644 ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/CSIRO_28072_202101.gif create mode 100644 ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/NTC_Y_island_202512.gif diff --git a/ARGO/oceancurrent/test_oceancurrent_file_server_api.py b/ARGO/oceancurrent/test_oceancurrent_file_server_api.py index 37e4ffea..80b31b40 100644 --- a/ARGO/oceancurrent/test_oceancurrent_file_server_api.py +++ b/ARGO/oceancurrent/test_oceancurrent_file_server_api.py @@ -171,6 +171,22 @@ def prepare_test_cases(self): ] } ], + "adjustedSeaLevelAnomaly-nonTidalSla": [ + { + "path": "/STATE_daily/NTSLA/Au", + "productId": "adjustedSeaLevelAnomaly-nonTidalSla", + "region": "Au", + "depth": None, + "files": [ + { + "name": "2026011812.gif" + }, + { + "name": "2026011818.gif" + } + ] + } + ], "oceanColour-chlA": [ { "path": "/STATE_daily/CHL/NZ", @@ -356,6 +372,19 @@ def prepare_test_cases(self): ], }, ], + "tidalCurrents-monthplots": [ + { + "path": "/tides/monthplots", + "productId": "tidalCurrents-monthplots", + "region": None, + "depth": None, + "files": [ + {"name": "CSIRO_28064_198712.gif"}, + {"name": "CSIRO_28072_202101.gif"}, + {"name": "NTC_Y_island_202512.gif"}, + ], + }, + ], "EACMooringArray": [ { "path": "/EAC_array_figures/SST/Brisbane", @@ -452,6 +481,7 @@ def test_file_structure_explorer(self): self.verify_json("sealCtdTags-10days", "AATAMS/", "sealCtdTags-10days") self.verify_json("sealCtdTags-temperature", "AATAMS/", "sealCtdTags-temperature") self.verify_json("adjustedSeaLevelAnomaly-sla", "STATE_daily/SLA", "SLA") + self.verify_json("adjustedSeaLevelAnomaly-nonTidalSla", "STATE_daily/NTSLA", "NTSLA") self.verify_json("oceanColour-chlA", "STATE_daily/CHL", "CHL") self.verify_json("oceanColour-chlA-region", "", "oceanColour-chlA") self.verify_json("adjustedSeaLevelAnomaly-sst", "", "adjustedSeaLevelAnomaly-sst") @@ -461,6 +491,7 @@ def test_file_structure_explorer(self): self.verify_json("currentMetersPlot-49", "timeseries", "currentMetersPlot-49") self.verify_json("tidalCurrents-spd", "tides", "tidalCurrents-spd") self.verify_json("tidalCurrents-sl", "tides", "tidalCurrents-sl") + self.verify_json("tidalCurrents-monthplots", "tides", "tidalCurrents-monthplots") self.verify_json("EACMooringArray", "EAC_array_figures", "EACMooringArray") # Verify no JSON file required if no gif files listed not_existed_path = os.path.join(self.file_test_dir, "timeseries", "currentMetersCalendar-48.json") diff --git a/ARGO/oceancurrent/tests/mnt/oceancurrent/website/STATE_daily/NTSLA/Au/2026011812.gif b/ARGO/oceancurrent/tests/mnt/oceancurrent/website/STATE_daily/NTSLA/Au/2026011812.gif new file mode 100644 index 00000000..e69de29b diff --git a/ARGO/oceancurrent/tests/mnt/oceancurrent/website/STATE_daily/NTSLA/Au/2026011818.gif b/ARGO/oceancurrent/tests/mnt/oceancurrent/website/STATE_daily/NTSLA/Au/2026011818.gif new file mode 100644 index 00000000..e69de29b diff --git a/ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/CSIRO_28064_198712.gif b/ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/CSIRO_28064_198712.gif new file mode 100644 index 00000000..e69de29b diff --git a/ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/CSIRO_28072_202101.gif b/ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/CSIRO_28072_202101.gif new file mode 100644 index 00000000..e69de29b diff --git a/ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/NTC_Y_island_202512.gif b/ARGO/oceancurrent/tests/mnt/oceancurrent/website/tides/monthplots/NTC_Y_island_202512.gif new file mode 100644 index 00000000..e69de29b