Skip to content

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

Merged
merged 8 commits into from
Jul 24, 2025

Conversation

jgaucher-cs
Copy link
Contributor

No description provided.

@jgaucher-cs jgaucher-cs changed the title Feat rspy156/rs data lifecycle julien RSPY-156 data lifecycle (cleanup of expired STAC items) Jul 18, 2025
" 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",
Copy link
Contributor

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?

Copy link
Contributor Author

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 ?

Copy link
Contributor

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.

Copy link
Contributor Author

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 @@
{
Copy link
Contributor Author

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.

@jgaucher-cs jgaucher-cs requested a review from vprivat-ads July 24, 2025 07:45
(I don't think this is necessary in local mode in fact)
@jgaucher-cs jgaucher-cs merged commit cd4386d into develop Jul 24, 2025
1 check passed
@jgaucher-cs jgaucher-cs deleted the feat-rspy156/rs-data-lifecycle_julien branch July 24, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants