-
Notifications
You must be signed in to change notification settings - Fork 1
Kate/server connection fixes #12
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: develop
Are you sure you want to change the base?
Kate/server connection fixes #12
Conversation
It seems with your changes the dates are still working fine (thanks for removing the redundant code). Are there any specific use cases where you see the dates failing? |
|
Some inconsistent behaviors, checking now 🙏 |
|
@doublebyte1 finished the edits and adjusted PR description 🙏 |
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.
Thanks for harmonising the datetime functions, and for the PR in pygeoapi (see my comments there)! 👍🏽
I have pulled and pushed confs from the server and it seems to be working pretty well. Unit tests for the server in the GitHub action are a good idea - let me have a look at that 💯
I noticed a couple of glitches that are not necessarily related to this PR, but I hope you don't mind if I write them here, anyway (:
- The diff function does not seem to work correctly for the "Resources" section. If I change anything in the resources (for instance, adding a temporal extent, or updating the title), and then save it, it shows me a diff with things that did not change. Example:
{
"added": {
"resources.countries.extents.temporal.begin": "2025-12-29T00:00:00Z"
},
"removed": {},
"changed": {
"resources.countries.description": {
"old": "Countries of the world (SpatialLite)",
"new": {
"en": "Countries of the world (SpatialLite)"
}
},
"resources.countries.keywords": {
"old": [
"countries",
"natural eart"
],
"new": {
"en": [
"countries",
"natural eart"
]
}
},
"resources.countries.title": {
"old": "Countries in the world (SpatialLite Provider)",
"new": {
"en": "Countries in the world (SpatialLite Provider)"
}
}
}
}
-
Deleting a resource is not triggering a change in the UI, or sending any information to the user that the resource was deleted (although it effectively was). As a consequence, the user may try to delete the resource multiple times throwing a error, because the key does not exist anymore. Example:
File "/home/joana/.local/share/QGIS/QGIS3/profiles/default/python/plugins/pygeoapi_config/ui_widgets/UiSetter.py", line 592, in preview_resource if isinstance(dialog.config_data.resources[dialog.current_res_name], dict): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'countries'My suggestion upon such a delicate operation as deletion, would be to send a confirmation box asking the user if they really want to delete the resource. Upon confirmation, the resource would be deleted, a message would be send to the user with the status of the operation (much like we do on the push configuration to server) and the UI would be refresh to not show that resource anymore.
Thanks again for the great work! 🥇
- add GUI dependencies for (headless) unit tests
|
Thanks @doublebyte1 ! I will check why the UI is not refreshing, and add a confirmation window 👍 Regarding the resources diff, it follows the same behavior as Metadata: converts everything to a dictionary with "en" as a default language. What I noticed before is that the language should instead be read from the Server section, and not default to English. Nevertheless, we can change this behavior entirely. I can add an empty dropdown option for the language, which upon Save will default the value to list (instead of a dictionary Language: Value). But this will trigger more if/else conditions, like do we use Metadata as a benchmark and make resources follow the format? If Metadata is a list, do we allow Resources to have a dictionary? If a user tries to add an entry with an empty language value, we should only allow it if there are no values yet, etc. We can do either: just adjust the default language correctly, or change the behavior to allow lists in Metadata and Resources. |
@KatKatKateryna no need to complicate this for the purpose of the diff. I think we can stick to the default language, as you suggested. |
I created a PR that added the Unit Test (and GitHub action step) for server push and pull here: KatKatKateryna#9 |
|
@KatKatKateryna could you merge KatKatKateryna#9 before I merge this? 🙏🏽 |
Add Unit Test for Server Push and Pull
|
@doublebyte1 all edits done, server-tests PR merged! |
Small improvements:
Remaining issues: