-
Notifications
You must be signed in to change notification settings - Fork 102
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
Configure the landing page id, description, etc. via env vars #639
Conversation
…e and version via env variables
Should this be defined here, or in the backend implementations when they call the See this PR |
I believe it's fine here as it's just the fallback for when it's not passed from the implementations. It would fail if the implementatons pass a default value, too. Also, I believe that this is something that is not backend specific and as such should in general be in the common implementation, otherwise the behavior is different depending on tha backend. That is not logical to me. If we go forward with stac-utils/stac-fastapi-elasticsearch-opensearch#207, we should align the variable names @jamesfisher-gis |
Actually, none of the implementations include a title or description when calling the
Agreed. But from a code readability perspective I think it is better to have the title and description defined when calling the
Yup. Regardless I changed the env vars here to match yours. |
Why is that? I guess then I don't understand how attrs works. |
No, you are right. I forgot that the get env was in the default argument. |
We are actually already using this in stac-fastapi-elasticsearch-opensearch. stac-utils/stac-fastapi-elasticsearch-opensearch#207 |
Could we add this to v2.5.0 and then leading up to v3.0.0 try to reconcile this with #499? |
* use pydantic settings * rename stac_fastapi_id to stac_fastapi_landing_id
Related Issue(s):
Description:
Allow an easy way to configure the landing page id, description, title and version via env variables.
Maybe there's another way to do it properly, but it was not documented and on Gitter no one seemed to know a way wither.
So trying to enable a way to set the information via environment variable.
PR Checklist:
pre-commit
hooks pass locallymake test
)make docs
)