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

Test for r.geomorphon fails due to optional with default confusion #2029

Closed
wenzeslaus opened this issue Dec 22, 2021 · 3 comments
Closed

Test for r.geomorphon fails due to optional with default confusion #2029

wenzeslaus opened this issue Dec 22, 2021 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@wenzeslaus
Copy link
Member

Test fails with option <profiledata> requires <coordinates> because there is confusion about optional parameters with default values. This seems to be more an issue with to pygrass and GUI than with r.geomorphon or parser according to analysis by @infrastation and others.

History (in r.info) and pygrass Module fill in the defaults (so profiledata="-" profileformat="json" is put there). However, when such command is executed, it fails with:

ERROR: Option <profiledata> requires <coordinates>
ERROR: Option <profileformat> requires <coordinates>

This happened only after I suggested to @infrastation to use the automated check declaration instead of a manual checks. For r.geomorphon, the solution is either going back to the manual check or not providing defaults which may actually make sense in this case. However, it seems that the issue is in pygrass and the same issue happens to be in GUI too. Maybe the parser can be modified because the defaults are sometimes recorded even when not used (for history), but it seems to me now that the first issue is that the Python code (both GUI and independently pygrass) is mishandling the defaults.

Originally posted by @wenzeslaus in #1157 (comment). See also the following comments there.

@wenzeslaus wenzeslaus added the bug Something isn't working label Dec 22, 2021
@wenzeslaus wenzeslaus added this to the 8.0.1 milestone Dec 22, 2021
@infrastation
Copy link
Contributor

It might help to add a few paragraphs to gislib_cmdline_parsing.html to define more precisely what "default" and "optional" means; and only then to eliminate discrepancies in the offending plugins and parts of the API.

@ninsbl
Copy link
Member

ninsbl commented Feb 20, 2022

@ninsbl
Copy link
Member

ninsbl commented Feb 23, 2022

Fixed in #2226

@ninsbl ninsbl closed this as completed Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants