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 FastAPI to avoid OpenAPI docs rendering issues #246

Merged
merged 6 commits into from
Aug 27, 2021

Conversation

lossyrob
Copy link
Member

@lossyrob lossyrob commented Aug 27, 2021

Related Issue(s): #242

Description:

This PR pins fastapi to 0.67.*, which is tested to work for rendering OpenAPI docs (where the recent 0.68.* release does not).
It also removes fastapi as a dependency from all subpackages besides stac-fastapi.types, the base subpackage which all others depend, to allow a single package to determine the pinned version. It also adds stac-fastapi.types as a dependency to stac-fastapi.api, which was incorrectly missing. Lastly, it removes titiler from the docker image (via pip install stac_api.extensions[tiler]) as that forces titiler's pinned FastAPI version, which is 0.63. IMO in future work we should remove the tile extension as the recommended way to integrate titiler and stac-fastapi is to run independent services.

This removes the single test against the tiles extension, as removing titiler from the docker image causes this test to fail make test. Created #245 to track whether these should be re-added (and the dependency conflicts between titiler and stac-fastapi resolved) or if the tile extension should be dropped completely.

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, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

titiler depends on an earlier version of FastAPI and doesn't allow the
dockerized server to have the FastAPI version dictated by the
stac-fastapi setup.
This pins fastapi to 0.67.* in stac_fastapi.types, and has all other
packages rely on that dependency to pull in the correct version. This
also adds a missing dependency on stac_fastapi.types in
stac_fastapi.api.

Fixes #242
This breaks the dockerized tests as titiler isn't installed in the
docker image anymore. Based on the outcome of #245, these (and ideally
more robust tests) can be re-added, or the tiles extension will be
dropped completely.
I do not know why, but installing the tiles extra re-installs
stac-fastapi.types in a way that breaks an import.
@lossyrob lossyrob merged commit a68d280 into master Aug 27, 2021
@lossyrob lossyrob deleted the fix/rde/pin-fastapi branch August 27, 2021 20:36
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