Skip to content

refactor: move extensions to their own packages#1650

Merged
gadomski merged 25 commits intomainfrom
split-extensions
Apr 3, 2026
Merged

refactor: move extensions to their own packages#1650
gadomski merged 25 commits intomainfrom
split-extensions

Conversation

@gadomski
Copy link
Copy Markdown
Member

@gadomski gadomski commented Feb 12, 2026

This is a proposed refactor of each extension into its own Python package. Basic idea goes like this:

  • Change the main Python package to be named pystac-core, but keep the code and import paths the same
  • Move each extension to its own Python package
  • Create a "meta" package named pystac that depends on everything
  • Create a custom pytest plugin so we can share config among all the packages
  • Relax our coverage expectation to 70%, and only run coverage on the core code (not extensions)

This should keep the install story and API identical, while simultaneously de-coupling our extension versions from our main PySTAC version.

Opening as a draft to get a smell check on the idea.

Note

I've disabled the benchmark CI for the time being to get things green, as asv is cranky with the new setup.

@gadomski gadomski requested a review from jsignell February 12, 2026 20:07
@gadomski gadomski self-assigned this Feb 12, 2026
@gadomski gadomski marked this pull request as ready for review February 18, 2026 18:44
Copy link
Copy Markdown
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

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

Whoa. I love it 😍

The only part that is hitting me a little weird is that the extension logic is nested under pystac/extensions. Aside from that looking a little odd I am also wondering if there is a risk of a conflicting file existing in pystac core.

@gadomski
Copy link
Copy Markdown
Member Author

gadomski commented Mar 2, 2026

The only part that is hitting me a little weird is that the extension logic is nested under pystac/extensions. Aside from that looking a little odd I am also wondering if there is a risk of a conflicting file existing in pystac core.

Yeah, it's a good point, though if we move those files (base.py, ext.py, and hooks.py) it'll be a breaking API change? Maybe we move them out of pystac/extensions when we do v2.0?

Comment thread extensions/projection/pyproject.toml
@gadomski gadomski requested a review from jsignell March 10, 2026 11:18
Comment thread README.md
@gadomski
Copy link
Copy Markdown
Member Author

Just for sake of example, the latest release-please PR (#1632) is a good illustration of why splitting extensions is good:

image

I don't think the storage extension should bump our MINOR.

Comment thread .github/workflows/continuous-integration.yml
Copy link
Copy Markdown
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

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

This looks great! Just a few little comments

Comment thread tests/extensions/test_ext.py Outdated
Comment thread pytest-pystac/pytest_pystac/plugin.py
@gadomski gadomski added this pull request to the merge queue Apr 3, 2026
Merged via the queue into main with commit 2b2f6b8 Apr 3, 2026
17 checks passed
@gadomski gadomski deleted the split-extensions branch April 3, 2026 19:43
@jsignell jsignell mentioned this pull request Apr 3, 2026
10 tasks
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.

2 participants