Skip to content
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

Collection update endpoint #177

Merged
merged 14 commits into from
Feb 2, 2024

Conversation

rhysrevans3
Copy link
Contributor

@rhysrevans3 rhysrevans3 commented Dec 11, 2023

Related Issue(s):

Description:

Allow collections to be updated without the deletion of all sub items. If collection id is changed id of the existing collection must be present in the query parameters as collection_id.

Use case:

Adding a new item to a collection adds a new variable to collection summary/changes extent.

  • Current workflow:

    • Old collection and it's items are deleted.
    • New collection is created.
    • All items would then need to be rebuilt.
  • New workflow:

    • if collection id remains the same:
      • The collection is updated.
    • Else:
      • New collection is created.
      • All items are moved to new index and their collection variable are updated.
      • The old collection is deleted.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

@rhysrevans3 rhysrevans3 marked this pull request as ready for review January 5, 2024 12:44
@rhysrevans3 rhysrevans3 marked this pull request as draft January 5, 2024 12:45
@rhysrevans3 rhysrevans3 marked this pull request as ready for review January 16, 2024 11:41
Copy link
Collaborator

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good. What do you think about writing a test?

@rhysrevans3
Copy link
Contributor Author

rhysrevans3 commented Jan 30, 2024

@jonhealy1 I've added a couple of tests let me know if there are anymore that you think should be added.

@jonhealy1
Copy link
Collaborator

@jonhealy1 I've added a couple of tests let me know if there are anymore that you think should be added.

Great thank you. I will do a final review tomorrow.

@jonhealy1 jonhealy1 mentioned this pull request Feb 1, 2024
@jonhealy1 jonhealy1 self-requested a review February 1, 2024 03:49
Copy link
Collaborator

@jamesfisher-geo jamesfisher-geo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@jonhealy1 jonhealy1 merged commit 481f61e into stac-utils:main Feb 2, 2024
4 checks passed
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.

3 participants