Skip to content

Commit

Permalink
Rename of offshore field after discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyh committed Mar 7, 2024
1 parent fd8d454 commit 412e57e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions eodatasets3/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions eodatasets3/wagl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
Binary file not shown.
4 changes: 3 additions & 1 deletion tests/integration/test_packagewagl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

0 comments on commit 412e57e

Please sign in to comment.