Repository navigation
r.sim: Rename the option random_seed to seed - #8032
Merged
Merged
Conversation
The random seed is the option seed in the eleven other tools which take one, all through G_OPT_M_SEED, and only r.sim.water and r.sim.sediment call it random_seed. The key in the history and the run summary is seed already. The old name keeps working through the renamed options list, with the parser's warning, as the earlier renames of these tools do. Written with the help of Claude Code.
petrasovaa
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
r.sim.water and r.sim.sediment call their random seed option
random_seed. All other random tools and the standard option call itseed, so this renames the option and keeps the old name working through the renamed options list, with the parser's warning.Follows the r.sim migration (#7980), now merged.
Details (AI generated)
Evidence
seed, all throughG_OPT_M_SEED: r.mapcalc, r.mapcalc.simple, r.random, r.random.cells, r.random.surface, r.surf.fractal, r.surf.gauss, r.surf.random, v.perturb, v.ppa and v.random. r.sim.water and r.sim.sediment are the only tools withrandom_seed.seedfor something else, r.lake for the raster of starting points and i.cluster for the file of initial signatures, so the name is not free of the other meaning, but the convention for the random seed is settled by the standard option.seedalready, chosen for this rename.option <random_seed> has been renamed to <seed>.The change
random_seed; they now define it as the plain standard option, so the key isseed. The deprecation message of-snow namesseed.lib/gis/renamed_optionsgetsrandom_seed:seedfor both tools.seed. A new test checks thatrandom_seedis still accepted, with the warning, and gives the result ofseed.The code and this description were written with Claude Code (Claude Fable 5.1) and reviewed by the author of the PR.