Skip to content

Conversation

@pjhartzell
Copy link
Collaborator

@pjhartzell pjhartzell commented Sep 8, 2025

Summary:

  • The changes in this PR provide deterministic order during collection assignment through use of an array rather than a map (order not guaranteed) and per-collection upload options (with the ability to add more per-collection configuration in the future).
  • Along the way, the payload properties that were embedded in the Task class were extracted to a Payload class to separate concerns/data models.
  • It's been a while since this repo has been updated, so this PR modernizes to use uv and updates CI and pre-commit. It also makes some extensive changes and additions to the README, gets readthedocs working, and makes a minimal changeset to the readthedocs content.
  • Python 3.9 is EOL next month, so support is removed.
  • All changes are backwards compatible...except the removal of Python 3.9.

Related Issue(s):

Proposed Changes:

  1. Extracts the payload data model from within the task model into a new Payload class.
  2. Adds a collection_matchers array to the payload process block. Mutually exclusive with the legacy process.upload_options.collections map. This supports deterministic order in the pattern matching and directly supports a "catch_all" matcher, which is a common need.
  3. Adds collection_options map to the payload process block. Supports collection-specific upload_options, with a fallback to the global process.upload_options if a collection is not found in the map.
  4. Remove Python 3.9 support.

PR Checklist:

  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@pjhartzell pjhartzell marked this pull request as ready for review September 11, 2025 22:03
@pjhartzell pjhartzell requested a review from jkeifer September 11, 2025 22:03
@pjhartzell pjhartzell requested a review from ircwaves September 12, 2025 18:33
Copy link
Member

@ircwaves ircwaves left a comment

Choose a reason for hiding this comment

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

LGTM.

- required either collection_matchers or legacy collection mapping
  to be non-empty. this is not backwards compatible as existing
  payloads do not require any collection matching/mapping configuration.
@pjhartzell pjhartzell requested a review from jkeifer September 16, 2025 21:36
Copy link
Member

@jkeifer jkeifer left a comment

Choose a reason for hiding this comment

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

I left some comments that could result in changes if you so choose, but I am satisfied with the current state of everything (note: it was a bit hard to review all the changes because it looks like you pulled in a bunch of ruff rules that touched a lot of code 😅). Nothing I mentioned is really a deal breaker so do as you choose.

@ircwaves ircwaves enabled auto-merge (squash) September 17, 2025 14:50
@ircwaves ircwaves disabled auto-merge September 17, 2025 14:51
@ircwaves ircwaves merged commit aeddac9 into stac-utils:main Sep 17, 2025
8 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.

Per collection upload options Collections should be an array?

3 participants