diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index d28f072..80d2e49 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -19,7 +19,13 @@ env: DOCKER_REGISTRY: ghcr.io jobs: - + build: + steps: + - name: Free disk space before build + run: | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc + docker system prune -af + # ...rest of your steps # Calculate variables for this workflow set-env: if: github.actor != 'dependabot[bot]' # ignore pull requests by github bot diff --git a/src/ADGS/poetry.lock b/src/ADGS/poetry.lock index 22d2c2b..024c1d3 100644 --- a/src/ADGS/poetry.lock +++ b/src/ADGS/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. [[package]] name = "bcrypt" diff --git a/src/DPR/DPR_processor_mock.py b/src/DPR/DPR_processor_mock.py index e7de9a4..d8a7c1a 100644 --- a/src/DPR/DPR_processor_mock.py +++ b/src/DPR/DPR_processor_mock.py @@ -115,8 +115,9 @@ def payload_to_url(self): @staticmethod def read_attrs(path: pathlib.Path): """Read zarr attributes from zip or folder.""" - data = zipfile.ZipFile(path, "r").read(f"{path.stem}/.zattrs") if path.suffix == ".zip" else open(path / ".zattrs").read() - return json.loads(data) + #data = zipfile.ZipFile(path, "r").read(f"{path.stem}/.zattrs") if path.suffix == ".zip" else open(path / ".zattrs").read() + with open(pathlib.Path(__file__).resolve().parent / "default_zattrs.json") as data: + return json.loads(data.read()) def update_product(self, path: pathlib.Path, ptype): default_processing_stamp = { diff --git a/src/DPR/default_zattrs.json b/src/DPR/default_zattrs.json index d6be279..e7e09f3 100644 --- a/src/DPR/default_zattrs.json +++ b/src/DPR/default_zattrs.json @@ -7,7 +7,7 @@ "history": [ { "output": "Downlinked Stream", - "processingTime": "2022-04-12T05:47:45.772210", + "processingTime": "2025-09-10T06:10:21.181317Z", "processor": null, "type": "Raw Data" }, @@ -18,13 +18,13 @@ "Raw Data": "Downlinked Stream" }, "output": "Unknown", - "processingTime": "2022-04-12T06:12:34.086648", + "processingTime": "2025-09-10T06:12:34.181317Z", "processor": null, "type": "Raw Data" }, { "output": "Downlinked Stream", - "processingTime": "2022-04-12T05:47:29.878126", + "processingTime": "2025-09-10T06:14:29.181317Z", "processor": null, "type": "Raw Data" }, @@ -35,7 +35,7 @@ "Raw Data": "Downlinked Stream" }, "output": "Unknown", - "processingTime": "2022-04-12T06:16:02.536571", + "processingTime": "2025-09-10T06:16:02.181317Z", "processor": null, "type": "Raw Data" }, @@ -48,7 +48,7 @@ }, "output": "/data/CDP/production//226510/S1A_IW_RAW__0SDV_20220412T054443_20220412T054516_042736_051989_B5EF.SAFE", "processingCentre": "S1A-PS, ESA", - "processingTime": "2022-04-12T06:17:42.640978", + "processingTime": "2025-09-10T06:17:42.181317Z", "processor": "", "type": "Level-0 Product" }, @@ -64,7 +64,7 @@ }, "output": "S1A_IW_SL2__1_DV_20220412T054446_20220412T054516_042736_051989_BB0C.SAFE", "processingCentre": "Copernicus Ground Segment, ESA", - "processingTime": "2022-04-12T06:42:55.000000", + "processingTime": "2025-09-10T06:42:55.181317Z", "processor": "Sentinel-1 IPF", "type": "Level-1 Intermediate SLC Product", "version": "003.51" @@ -75,7 +75,7 @@ }, "output": "S1A_IW_GR2__1_DV_20220412T054447_20220412T054512_042736_051989_F70F.SAFE", "processingCentre": "Copernicus Ground Segment, ESA", - "processingTime": "2022-04-12T06:44:44.000000", + "processingTime": "2025-09-10T06:44:44.181317Z", "processor": "Sentinel-1 IPF", "type": "Level-1 Intermediate GRD Product", "version": "003.51" @@ -90,7 +90,7 @@ }, "output": "", "processingCentre": "Unknown, Unknown", - "processingTime": "2022-04-12T06:51:59.109790", + "processingTime": "2025-09-10T06:51:59.181317Z", "processor": "Sentinel-1 IPF", "type": "L2", "version": "03.51" @@ -108,14 +108,17 @@ "transmitter_polarisation": "VV" }, "stac_discovery": { - "assets": { - "file": { - "href": "", - "roles": [ - "data" - ] - } - }, + "type": "Feature", + "stac_version": "1.0.0", + "id": "SAR Standard L2 Product", + "stac_extensions": [ + "https://stac-extensions.github.io/eopf/v1.0.0/schema.json", + "https://stac-extensions.github.io/eo/v1.1.0/schema.json", + "https://stac-extensions.github.io/sat/v1.0.0/schema.json", + "https://stac-extensions.github.io/view/v1.0.0/schema.json", + "https://stac-extensions.github.io/scientific/v1.0.0/schema.json", + "https://stac-extensions.github.io/processing/v1.1.0/schema.json" + ], "bbox": [ 7.23847, 41.496895, @@ -123,6 +126,7 @@ 43.405128 ], "geometry": { + "type": "Polygon", "coordinates": [ [ [ @@ -140,23 +144,22 @@ [ 7.23847, 42.99741 + ], + [ + 6.843285, + 41.496895 ] ] - ], - "type": "Polygon" + ] }, - "id": "SAR Standard L2 Product", - "links": [ - { - "href": "./.zattrs.json", - "rel": "self", - "type": "application/json" - } - ], "properties": { - "created": "2022-04-12T06:51:59.109790", - "datetime": "null", - "end_datetime": "2022-04-12T05:45:12.619848", + "created": "2025-09-10T06:51:59.181317Z", + "datetime": "2025-09-10T06:50:59.181317Z", + "end_datetime": "2025-09-10T05:45:12.181317Z", + "start_datetime": "2025-09-10T05:44:47.181317Z", + "updated": "2025-09-11T06:37:32.759103Z", + "published": "2025-09-11T06:37:32.758929Z", + "expires": "2025-10-11T06:37:32.762681Z", "eopf:data_take_id": "334217", "eopf:instrument_mode": "IW", "eopf:instrument_swath": "IW", @@ -183,21 +186,25 @@ } ], "sat:absolute_orbit": 42736, - "sat:anx_datetime": "2022-04-12T05:07:10.890454", + "sat:anx_datetime": "2025-09-10T05:07:10.181317Z", "sat:orbit_state": "DESCENDING", "sat:platform_international_designator": "2014-016A", - "sat:relative_orbit": 139, - "start_datetime": "2022-04-12T05:44:47.620394" + "sat:relative_orbit": 139 }, - "stac_extensions": [ - "https://stac-extensions.github.io/eopf/v1.0.0/schema.json", - "https://stac-extensions.github.io/eo/v1.1.0/schema.json", - "https://stac-extensions.github.io/sat/v1.0.0/schema.json", - "https://stac-extensions.github.io/view/v1.0.0/schema.json", - "https://stac-extensions.github.io/scientific/v1.0.0/schema.json", - "https://stac-extensions.github.io/processing/v1.1.0/schema.json" - ], - "stac_version": "1.0.0", - "type": "Feature" + "assets": { + "file": { + "href": "file:///data/my_product.SAFE", + "roles": [ + "data" + ] + } + }, + "links": [ + { + "href": "./.zattrs.json", + "rel": "self", + "type": "application/json" + } + ] } } \ No newline at end of file