From 99a92be5fcd44435e20586379a09c59e45a833a3 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Tue, 18 Jun 2024 19:00:17 +0200 Subject: [PATCH] Auto-reformat JSON (using pre-commit) --- .pre-commit-config.yaml | 2 + algorithm_catalog/worldcereal.json | 42 +++++++++++---------- algorithm_invocations/worldcereal.json | 38 +++++++++---------- backend_catalog/cdse_openeo_federation.json | 24 ++++++------ backend_catalog/openeo_platform.json | 24 ++++++------ openeo_udp/worldcereal_inference.json | 41 ++++++++++---------- 6 files changed, 87 insertions(+), 84 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48dba3d..478d31c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,3 +10,5 @@ repos: - id: check-json - id: check-yaml - id: check-toml + - id: pretty-format-json + args: ["--autofix", "--no-sort-keys"] diff --git a/algorithm_catalog/worldcereal.json b/algorithm_catalog/worldcereal.json index fa97387..ef0f51a 100644 --- a/algorithm_catalog/worldcereal.json +++ b/algorithm_catalog/worldcereal.json @@ -2,7 +2,7 @@ "id": "worldcereal_maize", "type": "Feature", "conformsTo": [ - "http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core" + "http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core" ], "properties": { "created": "2024-05-17T00:00:00Z", @@ -11,7 +11,7 @@ "title": "ESA worldcereal global maize detector", "description": "A maize detection algorithm.", "cost_estimate": 0.1, - "cost_unit": "platform credits per kmĀ²", + "cost_unit": "platform credits per km\u00b2", "keywords": [ "agriculture", "crops" @@ -32,11 +32,11 @@ "position": "Researcher", "organization": "VITO", "links": [ - { - "href": "https://www.vito.be/", - "rel": "about", - "type": "text/html" - }, + { + "href": "https://www.vito.be/", + "rel": "about", + "type": "text/html" + }, { "href": "https://github.com/kvantricht", "rel": "about", @@ -44,19 +44,23 @@ } ], "contactInstructions": "Contact via VITO", - "roles": [ "principal investigator" ] + "roles": [ + "principal investigator" + ] }, { "name": "VITO", "links": [ - { - "href": "https://www.vito.be/", - "rel": "about", - "type": "text/html" - } + { + "href": "https://www.vito.be/", + "rel": "about", + "type": "text/html" + } ], "contactInstructions": "SEE WEBSITE", - "roles": [ "processor" ] + "roles": [ + "processor" + ] } ], "themes": [ @@ -66,7 +70,7 @@ "id": "AGRICULTURE" }, { - "id":"FIELD CROP PRODUCTS" + "id": "FIELD CROP PRODUCTS" } ], "scheme": "https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/sciencekeywords" @@ -77,11 +81,9 @@ ], "license": "other" }, - "linkTemplates": [ - - ], + "linkTemplates": [], "links": [ - { + { "rel": "udp", "type": "application/json", "title": "openEO UDP", @@ -104,4 +106,4 @@ "href": "https://apex.esa.int/license" } ] -} \ No newline at end of file +} diff --git a/algorithm_invocations/worldcereal.json b/algorithm_invocations/worldcereal.json index 0c7dd0f..fde0f82 100644 --- a/algorithm_invocations/worldcereal.json +++ b/algorithm_invocations/worldcereal.json @@ -1,26 +1,24 @@ [ - { "id": "maize_2020_belgium", "description": "Maize detection in Belgium in 2020", "backend": "openeofed.dataspace.copernicus.eu", - "openeo_graph": { - "biopar1": { - "process_id": "worldcereal_maize", - "namespace": "https://github.com/ESA-APEX/apex_algorithms/blob/main/openeo_udp/worldcereal_inference.json", - "arguments": { - "bbox": { - "west": 5.15183687210083, - "east": 5.153381824493408, - "south": 51.18192559252128, - "north": 51.18469636040683, - "crs": "EPSG:4326" - }, - "year": 2021 - }, - "result": true - } - } - + "openeo_graph": { + "biopar1": { + "process_id": "worldcereal_maize", + "namespace": "https://github.com/ESA-APEX/apex_algorithms/blob/main/openeo_udp/worldcereal_inference.json", + "arguments": { + "bbox": { + "west": 5.15183687210083, + "east": 5.153381824493408, + "south": 51.18192559252128, + "north": 51.18469636040683, + "crs": "EPSG:4326" + }, + "year": 2021 + }, + "result": true + } + } } -] \ No newline at end of file +] diff --git a/backend_catalog/cdse_openeo_federation.json b/backend_catalog/cdse_openeo_federation.json index 795b45f..6768b8e 100644 --- a/backend_catalog/cdse_openeo_federation.json +++ b/backend_catalog/cdse_openeo_federation.json @@ -2,7 +2,7 @@ "id": "openeofed", "type": "Feature", "conformsTo": [ - "http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core" + "http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core" ], "properties": { "created": "2024-05-17T00:00:00Z", @@ -29,14 +29,16 @@ { "name": "VITO", "links": [ - { - "href": "https://www.vito.be/", - "rel": "about", - "type": "text/html" - } + { + "href": "https://www.vito.be/", + "rel": "about", + "type": "text/html" + } ], "contactInstructions": "SEE WEBSITE", - "roles": [ "operator" ] + "roles": [ + "operator" + ] } ], "themes": [ @@ -51,11 +53,9 @@ ], "license": "other" }, - "linkTemplates": [ - - ], + "linkTemplates": [], "links": [ - { + { "rel": "alternate", "type": "text/html", "title": "CDSE openEO documentation", @@ -68,4 +68,4 @@ "href": "https://openeofed.dataspace.copernicus.eu" } ] -} \ No newline at end of file +} diff --git a/backend_catalog/openeo_platform.json b/backend_catalog/openeo_platform.json index f2ddeef..2f587a9 100644 --- a/backend_catalog/openeo_platform.json +++ b/backend_catalog/openeo_platform.json @@ -2,7 +2,7 @@ "id": "openeocloud", "type": "Feature", "conformsTo": [ - "http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core" + "http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core" ], "properties": { "created": "2024-05-17T00:00:00Z", @@ -29,14 +29,16 @@ { "name": "openEO platform", "links": [ - { - "href": "https://openeo.cloud", - "rel": "about", - "type": "text/html" - } + { + "href": "https://openeo.cloud", + "rel": "about", + "type": "text/html" + } ], "contactInstructions": "SEE WEBSITE", - "roles": [ "operator" ] + "roles": [ + "operator" + ] } ], "themes": [ @@ -51,11 +53,9 @@ ], "license": "other" }, - "linkTemplates": [ - - ], + "linkTemplates": [], "links": [ - { + { "rel": "alternate", "type": "text/html", "title": "openEO platform documentation", @@ -68,4 +68,4 @@ "href": "https://openeo.cloud" } ] -} \ No newline at end of file +} diff --git a/openeo_udp/worldcereal_inference.json b/openeo_udp/worldcereal_inference.json index 787c39d..2ea0ecf 100644 --- a/openeo_udp/worldcereal_inference.json +++ b/openeo_udp/worldcereal_inference.json @@ -1,15 +1,15 @@ { "specification": { - "parameters":[ - { - "name":"bbox", - "description":"A bounding box with the required fields `west`, `south`, `east`, `north` and optionally `base`, `height`, `crs`. The `crs` is a EPSG code or a WKT2:2018 string.", - "schema":{ - "type":"object", - "subtype":"bounding-box" - } - } - ], + "parameters": [ + { + "name": "bbox", + "description": "A bounding box with the required fields `west`, `south`, `east`, `north` and optionally `base`, `height`, `crs`. The `crs` is a EPSG code or a WKT2:2018 string.", + "schema": { + "type": "object", + "subtype": "bounding-box" + } + } + ], "returns": { "description": "netCDF file", "schema": { @@ -17,10 +17,10 @@ "subtype": "raster-cube" } }, - "public":true, - "description": "Computes ESA WorldCereal croptype product", - "summary": "Computes ESA WorldCereal croptype product", - "id":"worldcereal_croptype", + "public": true, + "description": "Computes ESA WorldCereal croptype product", + "summary": "Computes ESA WorldCereal croptype product", + "id": "worldcereal_croptype", "process_graph": { "aggregatetemporalperiod1": { "arguments": { @@ -494,7 +494,7 @@ } }, "spatial_extent": { - "from_parameter":"bbox" + "from_parameter": "bbox" }, "temporal_extent": [ "2023-01-01", @@ -526,7 +526,7 @@ } }, "spatial_extent": { - "from_parameter":"bbox" + "from_parameter": "bbox" }, "temporal_extent": [ "2023-01-01", @@ -543,7 +543,7 @@ ], "id": "SENTINEL1_GRD", "spatial_extent": { - "from_parameter":"bbox" + "from_parameter": "bbox" }, "temporal_extent": [ "2023-01-01", @@ -559,7 +559,7 @@ ], "id": "COPERNICUS_30", "spatial_extent": { - "from_parameter":"bbox" + "from_parameter": "bbox" }, "temporal_extent": null }, @@ -911,6 +911,7 @@ "scl_band_name": "SCL" }, "process_id": "to_scl_dilation_mask" - }} + } + } } -} \ No newline at end of file +}