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

Expand support for multiple extension uris #1091

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Apr 10, 2023

Related Issue(s):

Description:

From issue:

In #1081 we added support for older schema URIs to the ProjectionExtension. This behavior should be generalized so other extensions can use it easily. Ideas:

  • Add get_schema_uris() to the base mixin
  • Refactor the base has_extension() to check against get_schema_uris() instead of get_schema_uri()
  • Backport any extensions that have older-but-compatible schema uris (thinking maybe label at least?)

This doesn't solve the problem, it's more of a band-aid -- if a newer version of an extension is incompatible with the Python structure, we don't have a mechanism to "migrate".

xref #448 which is our tracking issue for the general problem of extension versions.

I looked over the merged PRs from the last year or so to try to get a sense of which extensions had gotten updates recently.

I also added the previous versions to the prev_extension_ids in the ExtensionHooks. This means that when the item is migrated, the extension schema uri gets updated as well. Note: It looks like there is a mechanism for migrating per-extension. You can see it in LabelExtensionHooks.migrate

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@jsignell jsignell self-assigned this Apr 10, 2023
@jsignell jsignell linked an issue Apr 10, 2023 that may be closed by this pull request
@gadomski gadomski self-requested a review April 11, 2023 11:18
@gadomski gadomski added this to the 1.8 milestone Apr 11, 2023
Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple light touchups.

CHANGELOG.md Outdated Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
@gadomski gadomski enabled auto-merge April 12, 2023 22:09
@gadomski gadomski added this pull request to the merge queue Apr 12, 2023
Merged via the queue into stac-utils:main with commit 2f72278 Apr 12, 2023
@jsignell jsignell deleted the ext-compat branch April 13, 2023 13:40
@jsignell jsignell mentioned this pull request May 1, 2023
5 tasks
@gadomski gadomski mentioned this pull request May 10, 2023
5 tasks
jpolchlo added a commit to jpolchlo/pystac that referenced this pull request May 22, 2023
jpolchlo added a commit to jpolchlo/pystac that referenced this pull request May 23, 2023
jpolchlo added a commit to jpolchlo/pystac that referenced this pull request May 25, 2023
jpolchlo added a commit to jpolchlo/pystac that referenced this pull request May 30, 2023
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.

Expand support for multiple extension uris
2 participants