-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for Reading/Writing configuration from a pygeoapi instance #11
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
base: master
Are you sure you want to change the base?
Conversation
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.
Nothing seems broken!:)
I left some comments, and also 2 suggestions:
- Use a single-choice radio button with an alternative choice, e.g. Use Server Connection and Use Local File Configuration. So it is more clear what are we choosing between.
- When pulling the data from the server, we might need to check the datetimeformat in the response, as currently it is returned as a non-supported string, therefore ignored (erased): e.g. "2000-10-30T18:24:39+00:00" instead of "2000-10-30T18:24:39Z"
And regarding the admin interface, not sure how it should be reacting on incoming requests, but currently it overwrites "example-config.yaml" with unsupported content format.
P.S. I can make a PR for my comments if it's quicker, except for the admin push configuration outcome
|
Hi @KatKatKateryna Thanks for the thourought review! 💯
I have added the extra radio button for clarity 🙃 and added more user facing error messages; would you be able to take care of the other stuff?
If you are running pygeoapi locally with the example-config.yaml as config file, it is normal for this file to be overwritten; this is exactly what the admin UI does - overwritting the config file from the server. What is not normal, is for it to be overwritten with unsupported content format. Can you give more details about this? |
|
Super, I also added some fixes in a new PR: #12 And regarding the push_to_server data update, here is what content is being pushed to example-config (originally it's the same as pygeoapi-config): |
@KatKatKateryna it seems that it is overwriting it with the openapi definition, rather than the config file. Maybe the $PYGEOAPI_CONFIG or $PYGEOAPI_OPENAPI are not set correctly? How are you running pygeoapi (can you paste the command line)? |
|
This is how I am running it, from the pygeoapi source directory (hot reload is needed to see the changes in the pygeoapi instance at runtime):
Important note: for the push to work, the |
|
Pulled the latest version with the updated instructions, all good now! I was using outdated commands |


This PR enables pulling and pushing a pygeoapi configuration from a pygeoapi server.