-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add data store parameters and data ID to the assets in the STAC published by xcube server #1029
Add data store parameters and data ID to the assets in the STAC published by xcube server #1029
Conversation
b0eed73
to
94891be
Compare
55a51d4
to
12dba1d
Compare
12dba1d
to
c806c6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adjust naming.
CHANGES.md
Outdated
@@ -26,6 +26,11 @@ | |||
* The `xcube.core.store.DataDescriptor` class now supports specifying time ranges | |||
using both `datetime.date` and `datetime.datetime` objects. Previously, | |||
only `datetime.date` objects were supported. | |||
* The xcube server STAC publication has been adjusted so that the data store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The xcube server STAC publication has been adjusted so that the data store | |
* The xcube server STAC API has been adjusted so that the data store |
CHANGES.md
Outdated
@@ -26,6 +26,11 @@ | |||
* The `xcube.core.store.DataDescriptor` class now supports specifying time ranges | |||
using both `datetime.date` and `datetime.datetime` objects. Previously, | |||
only `datetime.date` objects were supported. | |||
* The xcube server STAC publication has been adjusted so that the data store | |||
parameters and data ID, which are needed to open the data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameters and data ID, which are needed to open the data, | |
parameters and data ID, which are needed to open the data referred to by a STAC item, |
CHANGES.md
Outdated
@@ -26,6 +26,11 @@ | |||
* The `xcube.core.store.DataDescriptor` class now supports specifying time ranges | |||
using both `datetime.date` and `datetime.datetime` objects. Previously, | |||
only `datetime.date` objects were supported. | |||
* The xcube server STAC publication has been adjusted so that the data store | |||
parameters and data ID, which are needed to open the data, | |||
are now included with the asset; furthermore, a second assert called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are now included with the asset; furthermore, a second assert called | |
are now included with the item's `analytic` asset. | |
Furthermore, a second assert called |
@@ -7,6 +7,19 @@ | |||
], | |||
"type": "application/zarr", | |||
"href": "http://localhost:8080/s3/datasets/demo.zarr", | |||
"xcube:store_kwargs": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"xcube:store_kwargs": { | |
"xcube:data_store_params": { |
to align it with keyword argument data_store_params
of the data store API function new_data_store()
.
@@ -7,6 +7,19 @@ | |||
], | |||
"type": "application/zarr", | |||
"href": "http://localhost:8080/s3/datasets/demo.zarr", | |||
"xcube:store_kwargs": { | |||
"data_store_id": "s3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use separate asset xcube:data_store_id
to align it with the positional argument data_store_id
of the data store API function new_data_store()
.
} | ||
} | ||
}, | ||
"xcube:open_kwargs": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"xcube:open_kwargs": { | |
"xcube:open_data_params": { |
to align it with data store API method DataStore.open_data()
(-> open_data
) that takes all the given parameters (-> params
). And align it API method DataStore.get_open_data_params_schema()
.
} | ||
} | ||
}, | ||
"xcube:open_kwargs": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
], | ||
"type": "application/zarr", | ||
"href": "http://localhost:8080/s3/pyramids/demo.levels", | ||
"xcube:store_kwargs": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
xcube/webapi/ows/stac/controllers.py
Outdated
|
||
return { | ||
"analytic": { | ||
"title": f"{dataset_id} data access", | ||
"roles": ["data"], | ||
"type": "application/zarr", | ||
"href": f"{default_storage_url}/{dataset_id}.zarr", | ||
"href": f"{base_url}/s3/datasets/{dataset_id}.zarr", | ||
"xcube:store_kwargs": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments on test/webapi/ows/stac/demo-collection.json
above.
"xcube:analytic": { | ||
v["name"]: { | ||
"title": f"{v['name']} data access", | ||
"roles": ["data"], | ||
"type": "application/zarr", | ||
"href": f"{default_storage_url}/" f"{dataset_id}.zarr/{v['name']}", | ||
"href": f"{base_url}/s3/datasets/{dataset_id}.zarr/{v['name']}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments on test/webapi/ows/stac/demo-collection.json
above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeeha!
Closes #1020
Checklist:
Add docstrings and API docs for any new/modified user-facing classes and functionsNew/modified features documented indocs/source/*
CHANGES.md