-
Notifications
You must be signed in to change notification settings - Fork 104
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
reorganize code into submodules #106
Conversation
from stac_api.clients.base import BaseCoreClient | ||
from stac_api.config import ApiSettings, inject_settings | ||
from stac_api.errors import DEFAULT_STATUS_CODES, add_exception_handlers | ||
from stac_api.models import schemas | ||
from stac_fastapi.api.extensions import FieldsExtension | ||
from stac_fastapi.api.extensions.extension import ApiExtension | ||
from stac_fastapi.api.models import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's intentional to still import from both stac_api
and stac_fastapi
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm switching out the imports to stac_fastapi
as I make the submodules. By the time I'm done everything should be stac_fastapi
.
…gress on seperation of concerns...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made changes in #109 that address my review comments; let me know if you'd like any changes to that PR, and once that is merged in I'm +1 to move forward with this!
* Consolidate image building to only use docker-compose The makefile was building a named image, which was the same image as the docker-compose app service image, but they were not the same name. This commit consolidates the building and running of the image through the app service of the docker-compose, and absorbes the .env.example file into the env setup in docker-compose.yml * Use docker network instead of external hosts. * Add stac_fastapi_server package. This brings in the logic of stac_api.app into it's own subpackage. This is used by the development environment to spin up stac-fastapi via docker-compose * Read joplin data locally. The remotely hosted joplin data was failing the ingest as they do not have a "links" property, which makes them invalid STAC - the previous server didn't complain, but that was breaking the ingest into stac-fastapi. This adds an empty link properties to the data downloaded from the remote location. * Add fields to ApiSettings. This pulls in the settings fields taken from stac_api.config.ApiSettings. * Don't build separate image for migration. The migration container uses the same image as the app, but before this change a new image was being built off the same docker container. This moves migraitons to both depend on app and use it's image. It also mounts the source into the volume in case the dev is testing changes to migrations or the ingest script. * Pip install subpackages in the Dockerfile * Structure dependencies in setup.py's Restructure the Dockerfile to copy only what it needs as it installs the subpackages. This will help catch dependency errors. * Delete old stac_api package * Add version to stac-fastapi-server * Add a publish script. This will be used by CI to publish on tags. * Add publish GitHub action. This will publish stac-fastapi to pypi on any tag. * Fix broken import * Pull top level package version from api version * Pin stac-pydantic to 1.3.8 * Move search to polygon method out of types. Has dependency on shapely, which can be avoided in the types subproject. * Use Optional in param as it's possible to pass None * Refactor set logic * Pin sqlalchemy to 1.3.23 * Move global settings registry into stac-fastapi.types Settings are used in the types subproject, which is the base layer. This change makes the global instance of the settings that is set by the API to be held in the types subproject to avoid circular dependencies. * Move logic to include query fields in Fields to postgres client. This logic requires settings that are specific to the postgres client. Move this logic into the postgres client subpackage and remove from the pydantic validator chain. * Fixes from pre-commit formatting and linting
🎉 |
No description provided.