ESA-EarthCODE / EarthCODE

For use by the EarthCODE Project
0 stars 0 forks source link

As a VITO Platform, I want to Confirm that I can use the EarthCODE OGC API Records Schema , so that I can publish experiment/workflows in the future #5

Closed JanssenBrm closed 2 weeks ago

JanssenBrm commented 3 weeks ago

Provide a working validated example

JanssenBrm commented 3 weeks ago

Created ticket for follow-up: https://github.com/eu-cdse/openeo-cdse-infra/issues/302

JanssenBrm commented 2 weeks ago

An example is available at : https://github.com/ESA-APEx/apex_algorithms/blob/main/algorithm_catalog/worldcereal_inference.json

soxofaan commented 2 weeks ago

We have even more examples in that APEx algorithms repo of OGC records pointing to openEO process definitions (aka UDPs): https://github.com/ESA-APEx/apex_algorithms/tree/main/algorithm_catalog

GarinSmith commented 2 weeks ago

Hi @soxofaan , Thanks, this looks good. Can you please confirm if they all validate against the EarthCODE schema? E.g. https://github.com/EOEPCA/metadata-profile/tree/master/schemas Please see architecture document for more details.

GarinSmith commented 1 week ago

Hi @soxofaan,

I had a quick look at this and tested bap_composite.json at random. Using check-jsonschema --schemafile resource.json bap_composite.json // I think we need a better name for resource.json by the way I got Schema validation errors were encountered. bap_composite.json::$: 'geometry' is a required property bap_composite.json::$.properties.formats[0]: 'GeoTiff' is not of type 'object' bap_composite.json::$.properties.formats[1]: 'netCDF' is not of type 'object' bap_composite.json::$.properties.type: 'apex_algorithm' is not one of ['dataset', 'service', 'process', 'workflow']

However these were easily fixed using the approach we used for worldcereal_inference.json before E.g. check-jsonschema --schemafile resource.json bap_composite_v2.json ok -- validation done

See attached.

Does this approach seem reasonable to you?

bap_composite_v2.json

soxofaan commented 1 week ago

Hi @GarinSmith

I already fixed most of these issues with https://github.com/ESA-APEx/apex_algorithms/commit/cd199d370caff390446ab903f76f445e9e56da1b and https://github.com/ESA-APEx/apex_algorithms/commit/945b0289f28bf5584ac2910c8c0aac1f42c11115

One thing I'm however not sure about is changing properties.type from "apex_algorithm" to "process"`. We intentionally chose "apex_algorithm" to be very explicit what's it about. With "process" you loose that specificity, making it very generic. This probably requires some more thought

check-jsonschema --schemafile resource.json

I assume you are using the tool https://github.com/python-jsonschema/check-jsonschema here, but can you give me an exact pointer to that schema file?

soxofaan commented 1 week ago

can you give me an exact pointer to that schema file?

nevermind, I guess it can be found at https://github.com/EOEPCA/metadata-profile/tree/master/schemas , is that correct?

soxofaan commented 1 hour ago

FYI current validation only complains about that "type" issue mentioned above:

$ uv tool run check-jsonschema --schemafile EarthCODE/metadata-profile/schemas/resource.json APEx/apex_algorithms/algorithm_catalog/bap_composite.json Schema validation errors were encountered. APEx/apex_algorithms/algorithm_catalog/bap_composite.json::$.properties.type: 'apex_algorithm' is not one of ['dataset', 'service', 'process', 'workflow']