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

wxGUI/history: fix execute r/r3.mapcalc module command #3305

Merged
merged 8 commits into from
Jan 5, 2024

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Dec 14, 2023

Fixes #3304.

@tmszi tmszi added bug Something isn't working GUI wxGUI related labels Dec 14, 2023
@tmszi tmszi added this to the 8.4.0 milestone Dec 14, 2023
@tmszi tmszi self-assigned this Dec 14, 2023
@tmszi tmszi force-pushed the wxgui_history_fix_run_rmapcalc_module branch from 7d17e6a to 86a9609 Compare December 19, 2023 06:04
@tmszi
Copy link
Member Author

tmszi commented Dec 19, 2023

Rebase and resolve conflicts 86a9609

Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

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

Looks like using minus causes some problems for the parsing:

r.mapcalc "test = a - b"

and then using partial parameter name like:

r.mapcalc expr="test = a"

is failing too, but that's probably harder to address.
It may be better to put the parsing function elsewhere, maybe core.utils?

@tmszi
Copy link
Member Author

tmszi commented Dec 30, 2023

r.mapcalc expr="test = a"

Looks like using minus causes some problems for the parsing:

r.mapcalc "test = a - b"

and then using partial parameter name like:

r.mapcalc expr="test = a"

is failing too, but that's probably harder to address. It may be better to put the parsing function elsewhere, maybe core.utils?

Thanks for catching that. Fixed with c64ab82.

@github-actions github-actions bot added the Python Related code is in Python label Jan 1, 2024
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

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

Works great!
The only thing is it won't parse correctly the shortened variations of 'expression' parser enables (except 'expr'), so that's a limitation I would just accept for now.

@tmszi
Copy link
Member Author

tmszi commented Jan 4, 2024

Works great! The only thing is it won't parse correctly the shortened variations of 'expression' parser enables (except 'expr'), so that's a limitation I would just accept for now.

I forgot that it is possible to use a shortened version of the r.mapcalc module expression parameter (e|ex|exp|expr|expre|expres|express|expressi|expressio|expression), because I always used expression or expr param name, I fixed it with db6a00c.

@petrasovaa
Copy link
Contributor

Works great! The only thing is it won't parse correctly the shortened variations of 'expression' parser enables (except 'expr'), so that's a limitation I would just accept for now.

I forgot that it is possible to use a shortened version of the r.mapcalc module expression parameter (e|ex|exp|expr|expre|expres|express|expressi|expressio|expression), because I always used expression or expr param name, I fixed it with db6a00c.

I am wondering, would this be a problem in case you use something like:

r.mapcalc exp="test = a + e"
r.mapcalc exp="test = a + exp(5)"

@tmszi
Copy link
Member Author

tmszi commented Jan 4, 2024

I am wondering, would this be a problem in case you use something like:

It works as expected. However, I can add it to the func doc test.

@tmszi tmszi enabled auto-merge (squash) January 5, 2024 04:13
@tmszi tmszi force-pushed the wxgui_history_fix_run_rmapcalc_module branch from e5f5045 to a232676 Compare January 5, 2024 04:37
@tmszi tmszi merged commit bd0e406 into OSGeo:main Jan 5, 2024
23 checks passed
@tmszi tmszi deleted the wxgui_history_fix_run_rmapcalc_module branch January 5, 2024 08:25
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Jan 7, 2024
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Jan 7, 2024
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Jan 8, 2024
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] wxGUI/history: r/r3.mapcalc module command is not parsed correctly
2 participants