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

v.in.wfs : Migration to OWSLib based web service requests #4271

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

karunakar2
Copy link

@karunakar2 karunakar2 commented Sep 4, 2024

The python code of v.in.wfs uses Urllib and fetches features based on updating the wfs_url. OWSLib can be utilised for the purpose.

Modify the code to:
The code is updated to use OWSLib for web service requests in v.in.wfs and caters to the ToDo item / Enhancement in the code.

Prior code:

  1. wfs_url is modified to construct WFS requests

Proposed code:

  1. OWSlib functions are used to get capabilities and features
  2. variables are used to adapt to the option variables.

Note:
There is a need to update on the code against options["name"] and options["layer"] for uniformity; Suggestions welcome.
Attempting my first pull request in the space, request you to comment to update where necessary.

@github-actions github-actions bot added vector Related to vector data processing Python Related code is in Python module labels Sep 4, 2024
@karunakar2 karunakar2 changed the title Partial migration to depend on the OWSLib for OGC web service needs v.in.wfs : Migration to OWSLib based web service requests Sep 4, 2024
@petrasovaa
Copy link
Contributor

Thanks for your contribution! I am not super familiar with this tool, so maybe someone else can comment here. Since OWSlib is not a required dependency, it needs to imported this way to ensure CI will work. See also the rest of the guide to make sure the formatting conforms to our style.

Is this adding new functionality or just replacing the previous one?

@karunakar2
Copy link
Author

Hi @petrasovaa thanks for looking into this.
Will update per comments.

There was a todo item in the code to use OWSLib and the current code tries to incorporate it. Not new functionality per se.

@petrasovaa
Copy link
Contributor

@HamishB would you mind reviewing this, since you put the TODO in there?

@karunakar2 karunakar2 marked this pull request as draft September 5, 2024 01:33
@karunakar2
Copy link
Author

#4275 for relevant issue and testing.

@ninsbl
Copy link
Member

ninsbl commented Sep 5, 2024

Would URL quoting (https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote) be an alternative to a new - optional - dependency with owslib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Python Related code is in Python vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants