From 412e57e0da104bef0fb6b14393f5cdd8e59e8f02 Mon Sep 17 00:00:00 2001 From: Jeremy Hooke Date: Thu, 7 Mar 2024 16:28:30 +1100 Subject: [PATCH] Rename of offshore field after discussions --- eodatasets3/properties.py | 4 ++-- eodatasets3/wagl.py | 4 ++-- ...10713T054224_A031632_T48LWP_N03.01.wagl.h5 | Bin 3442008 -> 3442008 bytes tests/integration/test_packagewagl.py | 4 +++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/eodatasets3/properties.py b/eodatasets3/properties.py index e22b9231..7574cd57 100644 --- a/eodatasets3/properties.py +++ b/eodatasets3/properties.py @@ -331,8 +331,8 @@ class Eo3Dict(collections.abc.MutableMapping): "datetime": datetime_type, "dea:dataset_maturity": of_enum_type(("final", "interim", "nrt"), lower=True), "dea:product_maturity": of_enum_type(("stable", "provisional"), lower=True), - "dea:processing_region": of_enum_type( - ("continental_australia", "offshore_territories"), lower=True, strict=False + "dea:final_ancillaries": of_enum_type( + ("standard", "nonstandard"), lower=True, strict=False ), "dtr:end_datetime": datetime_type, "dtr:start_datetime": datetime_type, diff --git a/eodatasets3/wagl.py b/eodatasets3/wagl.py index c03ce787..781e90ad 100644 --- a/eodatasets3/wagl.py +++ b/eodatasets3/wagl.py @@ -1107,8 +1107,8 @@ def _apply_wagl_metadata(p: DatasetAssembler, wagl_doc: Dict): p.platform = source["platform_id"] p.instrument = source["sensor_id"] - if "processing_region" in wagl_doc: - p.properties["dea:processing_region"] = wagl_doc["processing_region"] + if "final_ancillaries" in wagl_doc: + p.properties["dea:final_ancillaries"] = wagl_doc["final_ancillaries"] try: p.processed = get_path(wagl_doc, ("system_information", "time_processed")) diff --git a/tests/integration/data/wagl-input/S2A_OPER_MSI_L1C_TL_VGS4_20210713T054224_A031632_T48LWP_N03.01/S2A_OPER_MSI_L1C_TL_VGS4_20210713T054224_A031632_T48LWP_N03.01.wagl.h5 b/tests/integration/data/wagl-input/S2A_OPER_MSI_L1C_TL_VGS4_20210713T054224_A031632_T48LWP_N03.01/S2A_OPER_MSI_L1C_TL_VGS4_20210713T054224_A031632_T48LWP_N03.01.wagl.h5 index 8e48e1f0ccb9d7694257320bf957de759a151d01..3ead2688c03ad0e541801f140d6ee35782f07113 100644 GIT binary patch delta 330 zcmXZT%Sr-K0LJk%GsntFOS_$}HtKZ0JBy%&(F?fg0pgGb1H%Mk`&tA-yD;cIB06ot zMc_ID!AIx`f_D9lKKSjvfB){&>f`3tdbYpI*`6yz^+k%oRLk*gIL7g1@L=WIc~_b0 zyZo}#>hB>$&m6zX(^TOijCFLTGsXZe!1clTxVaD8JunLnjm-xlKdS&G4&mgSkSwB*j39?mI2bf}jA0xTn8Xwcn8pldF^739 mU=d3wVi_wa!NV%nP{ukou!${fV+Xs~!#)mhsDrL=zx@G$1%P<~ diff --git a/tests/integration/test_packagewagl.py b/tests/integration/test_packagewagl.py index 9ac927e2..216cf837 100644 --- a/tests/integration/test_packagewagl.py +++ b/tests/integration/test_packagewagl.py @@ -2,6 +2,7 @@ from contextlib import contextmanager from datetime import datetime, timedelta, timezone from pathlib import Path +from pprint import pprint from textwrap import indent import pytest @@ -1592,4 +1593,5 @@ def test_offshore_wagl_package(tmp_path: Path): [output_metadata] = (tmp_path / "ga_s2am_ard_3").rglob("*.odc-metadata.yaml") doc = load_yaml(output_metadata) - assert doc["properties"]["dea:processing_region"] == "offshore_territories" + pprint(doc) + assert doc["properties"]["dea:final_ancillaries"] == "nonstandard"