Skip to content

Conversation

@petrasovaa
Copy link
Contributor

This came up in #6717 where we decided to implement default autoseeding in r.mapcalc, so that you don't have to always use -s flag.
It turned out somewhat more complicated due to the need to disable parallelization when using rand(), before we would disable it based on using -s of seed parameter, but whit -s removed, it needs to be decided based on whether the expression contains "rand function". So this solution finds out whether the rand function is used and then creates the seed and disables parallelization. The has_rand_expr was written by AI but I tested it quite a bit.

I adjusted all the cases I could find using -s flag with rand(), mostly in tests and GUI. The wrapper will be adjusted in #6717.

@github-actions github-actions bot added GUI wxGUI related raster Related to raster data processing temporal Related to temporal data processing Python Related code is in Python C Related code is in C HTML Related code is in HTML module docs markdown Related to markdown, markdown files tests Related to Test Suite labels Dec 16, 2025
Copy link
Contributor

@nilason nilason left a comment

Choose a reason for hiding this comment

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

I only have some minor mainly stylistic suggestions (please discard what you disagree with).

@petrasovaa
Copy link
Contributor Author

I only have some minor mainly stylistic suggestions (please discard what you disagree with).

Thanks, fixed!

@petrasovaa petrasovaa enabled auto-merge (squash) December 17, 2025 18:07
@petrasovaa petrasovaa merged commit cf870a5 into OSGeo:main Dec 18, 2025
27 checks passed
@github-actions github-actions bot added this to the 8.5.0 milestone Dec 18, 2025
@petrasovaa petrasovaa deleted the r.mapcalc-deprecatesflag branch December 18, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C Related code is in C docs GUI wxGUI related HTML Related code is in HTML markdown Related to markdown, markdown files module Python Related code is in Python raster Related to raster data processing temporal Related to temporal data processing tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants