From a941f8e47a6e2db3839368f6a7daa11b018d10b2 Mon Sep 17 00:00:00 2001 From: Weite Dai Date: Thu, 11 Jun 2026 15:27:10 +1000 Subject: [PATCH 1/3] feat: register FishSOOP product group and JSON index paths --- src/main/resources/config/json-paths-config.yaml | 7 +++++++ src/main/resources/config/products.yaml | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/main/resources/config/json-paths-config.yaml b/src/main/resources/config/json-paths-config.yaml index d05b7ce..43f11dd 100644 --- a/src/main/resources/config/json-paths-config.yaml +++ b/src/main/resources/config/json-paths-config.yaml @@ -80,3 +80,10 @@ products: description: "SWOT Global Sea Level Anomaly SSH products" paths: - /DR_SWOT/SSH/SSH.json + + - product: "FishSOOP" + description: "FishSOOP temperature profiles and anomalies" + paths: + - /fishsoop/fishSOOP-profiles.json + - /fishsoop/fishSOOP-quarterlyAnomalies.json + - /fishsoop/fishSOOP-depthAnomalies.json diff --git a/src/main/resources/config/products.yaml b/src/main/resources/config/products.yaml index 4108f26..49af605 100644 --- a/src/main/resources/config/products.yaml +++ b/src/main/resources/config/products.yaml @@ -167,3 +167,16 @@ ocean-current: id: "swotGsla-ssh" - title: "MDT" id: "swotGsla-mdt" + + - title: "FishSOOP" + id: "fishSOOP" + type: "ProductGroup" + children: + - title: "Regional Profiles" + id: "fishSOOP-profiles" + - title: "Quarterly Anomalies" + id: "fishSOOP-quarterlyAnomalies" + regionRequired: false + - title: "Depth Anomalies" + id: "fishSOOP-depthAnomalies" + regionRequired: false From c4829edc8aac079a0cf3b6b0c7513c3de5c3ab91 Mon Sep 17 00:00:00 2001 From: Weite Dai Date: Thu, 11 Jun 2026 15:38:20 +1000 Subject: [PATCH 2/3] test: cover FishSOOP product config and JSON index paths --- .../configuration/JsonPathsConfigTest.java | 13 +++++++++ .../ProductConfigIntegrationTest.java | 28 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/src/test/java/au/org/aodn/oceancurrent/configuration/JsonPathsConfigTest.java b/src/test/java/au/org/aodn/oceancurrent/configuration/JsonPathsConfigTest.java index 87a568c..ed4f028 100644 --- a/src/test/java/au/org/aodn/oceancurrent/configuration/JsonPathsConfigTest.java +++ b/src/test/java/au/org/aodn/oceancurrent/configuration/JsonPathsConfigTest.java @@ -44,4 +44,17 @@ void swotGslaShouldNotIndexMdt() { assertThat(entry).isPresent(); assertThat(entry.get().getPaths()).noneMatch(p -> p.contains("MDT") || p.contains("MDTCMEMS")); } + + @Test + void fishSoopShouldHaveThreeJsonPaths() { + Optional entry = config.getProducts().stream() + .filter(p -> p.getProduct().equals("FishSOOP")) + .findFirst(); + assertThat(entry).isPresent(); + assertThat(entry.get().getPaths()).containsExactly( + "/fishsoop/fishSOOP-profiles.json", + "/fishsoop/fishSOOP-quarterlyAnomalies.json", + "/fishsoop/fishSOOP-depthAnomalies.json" + ); + } } diff --git a/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java b/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java index 4f67691..f023dbe 100644 --- a/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java +++ b/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java @@ -139,4 +139,32 @@ void swotGslaGroupShouldContainSshAndMdtChildren() { assertThat(productMap).containsKey(child.getId()); }); } + + @Test + void fishSoopGroupShouldContainExpectedChildren() { + Product fishSoop = productGroupMap.get("fishSOOP"); + assertThat(fishSoop).isNotNull(); + assertThat(fishSoop.getTitle()).isEqualTo("FishSOOP"); + + List childIds = fishSoop.getChildren().stream().map(Product::getId).collect(Collectors.toList()); + assertThat(childIds).containsExactlyInAnyOrder( + "fishSOOP-profiles", + "fishSOOP-quarterlyAnomalies", + "fishSOOP-depthAnomalies" + ); + + fishSoop.getChildren().forEach(child -> { + assertThat(child.getParentId()).isEqualTo("fishSOOP"); + assertThat(child.getParentTitle()).isEqualTo("FishSOOP"); + assertThat(productMap).containsKey(child.getId()); + }); + } + + @Test + void fishSoopRegionFlagsShouldMatchConfig() { + // Profiles are per-region; the anomaly products index region-less records (region: null) + assertThat(productMap.get("fishSOOP-profiles").isRegionRequired()).isTrue(); + assertThat(productMap.get("fishSOOP-quarterlyAnomalies").isRegionRequired()).isFalse(); + assertThat(productMap.get("fishSOOP-depthAnomalies").isRegionRequired()).isFalse(); + } } From bd4936afd5a0f4b400f9556ab65b490925218252 Mon Sep 17 00:00:00 2001 From: Weite Dai Date: Thu, 11 Jun 2026 16:19:56 +1000 Subject: [PATCH 3/3] test: ensure FishSOOP product region flags are correctly validated --- .../ProductConfigIntegrationTest.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java b/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java index f023dbe..8c34374 100644 --- a/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java +++ b/src/test/java/au/org/aodn/oceancurrent/configuration/ProductConfigIntegrationTest.java @@ -163,8 +163,16 @@ void fishSoopGroupShouldContainExpectedChildren() { @Test void fishSoopRegionFlagsShouldMatchConfig() { // Profiles are per-region; the anomaly products index region-less records (region: null) - assertThat(productMap.get("fishSOOP-profiles").isRegionRequired()).isTrue(); - assertThat(productMap.get("fishSOOP-quarterlyAnomalies").isRegionRequired()).isFalse(); - assertThat(productMap.get("fishSOOP-depthAnomalies").isRegionRequired()).isFalse(); + Product profiles = productMap.get("fishSOOP-profiles"); + assertThat(profiles).isNotNull(); + assertThat(profiles.isRegionRequired()).isTrue(); + + Product quarterlyAnomalies = productMap.get("fishSOOP-quarterlyAnomalies"); + assertThat(quarterlyAnomalies).isNotNull(); + assertThat(quarterlyAnomalies.isRegionRequired()).isFalse(); + + Product depthAnomalies = productMap.get("fishSOOP-depthAnomalies"); + assertThat(depthAnomalies).isNotNull(); + assertThat(depthAnomalies.isRegionRequired()).isFalse(); } }