xcube-dev / xcube

xcube is a Python package for generating and exploiting data cubes powered by xarray, dask, and zarr.
https://xcube.readthedocs.io/
MIT License
201 stars 20 forks source link

Unify STAC and OGC API - Coverages #892

Closed pont-us closed 1 year ago

pont-us commented 1 year ago

Closes #889 .

This PR unifies the STAC and OGC Coverages APIs under the /ogc endpoint prefix. It also extends the STAC API: previously the STAC API only provided one collection, called datacubes, containing all the available datasets. This doesn't integrate well with coverages, which assumes one collection per dataset. So with this PR the STAC API also offers, in addition, one collection per dataset, each containing a single item for that dataset. Both representations are allowed by the STAC Datacube extension. So each dataset is now represented twice in the STAC API at different locations.

Additionally, this PR fixes a previously unnoticed bug in the STAC implementation which resulted in incorrect metadata being served for additional cube dimensions.

Checklist:

codecov[bot] commented 1 year ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (e20d6bd) 93.26% compared to head (c1e0b76) 93.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #892 +/- ## ========================================== + Coverage 93.26% 93.30% +0.04% ========================================== Files 447 447 Lines 34712 34833 +121 ========================================== + Hits 32373 32500 +127 + Misses 2339 2333 -6 ``` | [Files](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop) | Coverage Δ | | |---|---|---| | [test/server/test\_server.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-dGVzdC9zZXJ2ZXIvdGVzdF9zZXJ2ZXIucHk=) | `99.47% <100.00%> (+<0.01%)` | :arrow_up: | | [test/webapi/ows/coverages/test\_routes.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-dGVzdC93ZWJhcGkvb3dzL2NvdmVyYWdlcy90ZXN0X3JvdXRlcy5weQ==) | `100.00% <100.00%> (ø)` | | | [test/webapi/ows/stac/test\_controllers.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-dGVzdC93ZWJhcGkvb3dzL3N0YWMvdGVzdF9jb250cm9sbGVycy5weQ==) | `100.00% <100.00%> (ø)` | | | [test/webapi/ows/stac/test\_routes.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-dGVzdC93ZWJhcGkvb3dzL3N0YWMvdGVzdF9yb3V0ZXMucHk=) | `100.00% <100.00%> (ø)` | | | [xcube/server/api.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-eGN1YmUvc2VydmVyL2FwaS5weQ==) | `98.73% <100.00%> (+0.02%)` | :arrow_up: | | [xcube/util/jsonschema.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-eGN1YmUvdXRpbC9qc29uc2NoZW1hLnB5) | `93.94% <100.00%> (ø)` | | | [xcube/webapi/ows/coverages/routes.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-eGN1YmUvd2ViYXBpL293cy9jb3ZlcmFnZXMvcm91dGVzLnB5) | `98.46% <100.00%> (+0.02%)` | :arrow_up: | | [xcube/webapi/ows/stac/config.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-eGN1YmUvd2ViYXBpL293cy9zdGFjL2NvbmZpZy5weQ==) | `100.00% <100.00%> (ø)` | | | [xcube/webapi/ows/stac/routes.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-eGN1YmUvd2ViYXBpL293cy9zdGFjL3JvdXRlcy5weQ==) | `100.00% <100.00%> (ø)` | | | [xcube/webapi/ows/stac/controllers.py](https://app.codecov.io/gh/dcs4cop/xcube/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dcs4cop#diff-eGN1YmUvd2ViYXBpL293cy9zdGFjL2NvbnRyb2xsZXJzLnB5) | `97.09% <96.25%> (+3.86%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.