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

pin sub-modules (api/extensions) to specific version #678

Closed
vincentsarago opened this issue Apr 26, 2024 · 4 comments · Fixed by #743
Closed

pin sub-modules (api/extensions) to specific version #678

vincentsarago opened this issue Apr 26, 2024 · 4 comments · Fixed by #743

Comments

@vincentsarago
Copy link
Member

The three stac-fastapi sub-modules are linked together, mostly because of the mono-repo but also because they depends on each other

  • api depends on types (and not officially on extensions, 😬 circular dependency)
  • extensions depends on api and types

Right now we don't set any version limits of packages and technically this could mean that users could have different version of each packages... and this will not work (it could, but there is a hight chance of breaking changes between the packages).

in #625 (comment) I've proposed that we pin the sub-module to specific version but we reverted to acquire more opinions (#625 (comment))

FYI: we do this in titiler https://github.com/developmentseed/titiler/blob/main/src/titiler/mosaic/pyproject.toml#L34 and we use bump2version to update all the version when we do a release https://github.com/developmentseed/titiler/blob/main/.bumpversion.cfg (which we will introduce in #648)

@jonhealy1
Copy link
Collaborator

jonhealy1 commented Apr 26, 2024

I would like to know what the arguments are for not just putting all 3 libraries into one release? The next release could just be stac-fastapi==3.0.0.

Like @vincentsarago said, these submodules are dependent on each other. Types is already a dependency of Api. Adding Extensions to Api wouldn't add any new dependencies, just a tiny bit of code. Types and Api are both dependencies of Extensions. Adding Api and Extensions to Types only adds one library I think - brotli_asgi

I don't think there's ever a use case for running different versions of these libraries like stac-fastapi.types==2.4.9 with stac-fastapi.api==2.5.0? Maybe there is? I think we may start pinning these versions so they stay synced anyways.

@vincentsarago
Copy link
Member Author

I would like to know what the arguments are for not just putting all 3 libraries into one release

The 3 sub-module should/will always be released together.

I don't think there's ever a use case for running different versions of these libraries like stac-fastapi.types==2.4.9 with stac-fastapi.api==2.5.0? Maybe there is?

I don't think there is, but pinning the version in the sub-module insure they use the correct versions

@jonhealy1
Copy link
Collaborator

I'm wondering why we don't just push one release to PyPI instead of 3 I guess.

@vincentsarago
Copy link
Member Author

ah you mean why we have submodules, that's a good question!

I don't really know why, this comes from the time when we had the backends here. I think it's fine to keep them separate for now, but maybe something we can change for v4

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 a pull request may close this issue.

2 participants