Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a FastAPI app to serve as the entrypoint for the backend.
Fixes #36
It is composed of one main app which then mounts three sub-apps. These are accessible at the following prefixes:
/legacy
- This is where the original django web app is mounted. It is ran with the FastAPIWSGIMiddleware
and the implementation is based on the FastAPI docs, but with some considerable modifications in order to adapt to django. The django app's admin pages static files are also served by FastAPI using an additional mount/v1
- This contains a reimplementation of the legacy app's API, done using FastAPI and pydantic. It thus provides an openapi document and some dev docs, which document how it can be used. Not all path operations are reimplemented yet, but at least the API documentation should be/v2
- This contains an initial draft of what a more flexible API could look like. There aren't many endpoints in it yet, but it notably contains a proxy to THREDDS which is able to serve WMS requests.Also included:
Dockerfile
in order to cope with the new FastAPI application