Skip to content

Conversation

@RezwanM
Copy link

@RezwanM RezwanM commented Aug 27, 2025

Overview

This PR fixes #277

Changes:

  • Added a helper function for parsing AllowedValues. The problem seemed to be that the attribute allowedValues of the ProcessDescription object was being parsed by OWSLib as a Python set, which is inherently unordered. Parsing the element AllowedValues directly from raw XML into a list ensures the original order of items in AllowedValues is preserved.

Related Issue / Discussion

Additional Information

Links to other issues or sources.

Copy link
Contributor

@Zeitsperre Zeitsperre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering now whether the issue with the list of values is here or is deeper within OWSLib.

@RezwanM
Copy link
Author

RezwanM commented Sep 3, 2025

Hi, @Zeitsperre. I added some changes which addresses the issues you mentioned above. However, the tests are failing due to a ConnectionError.

@Zeitsperre Zeitsperre requested a review from cehbrecht September 3, 2025 17:37
@cehbrecht
Copy link
Member

@RezwanM @Zeitsperre just come comments:

  • could this instead be fixed in owslib itself? It looks like it needs an extra call to fill the allowed values as expected.
  • maybe add a test.

@RezwanM
Copy link
Author

RezwanM commented Sep 8, 2025

@cehbrecht @Zeitsperre

  • From my findings, the attribute allowedValues of the ProcessDescription object was being parsed by OWSLib as a Python set, which is inherently unordered. Parsing the element AllowedValues directly from raw XML into a list ensures the original order of items in AllowedValues is preserved. I could be wrong, but this seems like the only way to me.
  • I added a unit test for checking the order of AllowedValues.

@RezwanM RezwanM requested a review from Zeitsperre September 8, 2025 18:34
The formatted docstring for this process.
"""
doc = [process.abstract or "", ""]
_process = wps.describeprocess(process.identifier)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why this is necessary. In my recollection, WPSClient._processes is a dict with the output of describeprocess, so isn't _process exactly the same as process ?

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.

Function parameters in the form of a set are reported unordered

4 participants