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

Allow pgstac parameters for geojsonsearch to be globally set in Settings #186

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

zstatmanweil
Copy link
Contributor

Description

This closes #185. I have created a Settings object so the parameters to PgStac's geojsonsearch can be set globally via environment variables. I added an example to .env.example as well so hopefully it is clear how to set them. These can still also be set via query params.

Tests

I ran locally and made sure any change to these pgstac env variables would apply to any request I made. I then made sure I could pass in query params to a specific request and just that request would use that change. I confirmed those both by adding print statements in the code here, and working with my data that had issues when existwhenfull and skipcovered were both True. So easy for me to visually ensure what I expected to happen would happen.

@zstatmanweil
Copy link
Contributor Author

@vincentsarago, question for you: when I open a PR in one of your projects, do I make updates to the CHANGES file at that time? Or do you update that when releasing a new version?

@zstatmanweil
Copy link
Contributor Author

Also, I tried to follow instructions for running tests but I get this error for all of them: "psycopg.errors.FeatureNotSupported: extension "postgis" is not available"

@vincentsarago
Copy link
Member

🙏 @zstatmanweil

@vincentsarago, question for you: when I open a PR in one of your projects, do I make updates to the CHANGES file at that time? Or do you update that when releasing a new version?

It depends, I always appreciate a sentence in a changelog within an Unreleased section

Also, I tried to follow instructions for running tests but I get this error for all of them: "psycopg.errors.FeatureNotSupported: extension "postgis" is not available"

Interesting, I'll have a look

@zstatmanweil
Copy link
Contributor Author

I also added a line under Unreleased in the changes file

@vincentsarago vincentsarago merged commit c4a0915 into stac-utils:main Aug 30, 2024
8 checks passed
@vincentsarago
Copy link
Member

🙏 thanks @zstatmanweil

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.

add Settings to set pgstac.geojsonsearch defaults
2 participants