-
Notifications
You must be signed in to change notification settings - Fork 0
RSPY-156 data lifecycle (cleanup of expired STAC items) #162
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
Conversation
" collection_id = item[\"collection\"]\n", | ||
" item_id = item[\"id\"]\n", | ||
" http_session.put(\n", | ||
" f\"{catalog_client.href_service}/catalog/collections/{owner_id}:{collection_id}/items/{item_id}\",\n", |
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.
same question, why isn't the client method used?
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.
@vprivat-ads It seems to me that the pystac_client only has methods to request the database, not to update it. See: lib/python3.11/site-packages/pystac_client/client.py
Should I implement a new method in rs-client-libraries/rs_client/stac/catalog_client.py for this ?
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.
Ah, I see we only implemented four update operations in rs-client:
https://github.com/RS-PYTHON/rs-client-libraries/blob/develop/rs_client/stac/catalog_client.py#L192C1-L196C20
# - add_collection
# - remove_collection
# - add_item
# - remove_item
So yes we would need to add the other needed ones (update_item, delete_item, others if needed), I thought it was already done.
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.
@vprivat-ads I've added these methods in RS-PYTHON/rs-client-libraries#105 and updated the demo, please tell me if it's ok for you
@@ -0,0 +1,307 @@ | |||
{ |
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.
Note: I've added this test for the pystac_client from rs-client-libraries. The pytests from rs-client-libraries are actually very light, we don't simulate a stac service, it would require a lot of work.
The tests from this notebook use the real rs-server-catalog instance.
…ta-lifecycle_julien
(I don't think this is necessary in local mode in fact)
No description provided.