Skip to content

docs: update example docstrings for scenario arguments - #4009

Merged
quaquel merged 2 commits into
mesa:mainfrom
mmporong:docs-example-scenario-args
Oct 28, 2026
Merged

quaquel merged 2 commits into
mesa:mainfrom
mmporong:docs-example-scenario-args

Conversation

@mmporong

Copy link
Copy Markdown
Contributor

Pre-PR Checklist

  • This PR is a bug fix, not a new feature or enhancement.

Summary

Three advanced examples take their parameters from a Scenario since #3493, but their docstrings still describe the old keyword arguments.

Bug / Issue

  • MultiLevelAllianceModel.__init__(self, scenario) documents n, mean, std_dev and rng.
  • PdGrid.__init__(self, scenario) documents width, height, activation_order and payoffs (the scenario field is payoff) and leaves out torus.
  • EpsteinCivilViolence documents a seed argument; the seed now comes from scenario.rng.

Implementation

Docstrings only. The old descriptions are kept and moved under scenario, with the field names that AllianceScenario and PrisonersDilemmaScenario actually define. No code changes.

Testing

Compared the Args: sections in mesa/ with each function signature: these three examples were the only mismatches before the change and there are none after. ruff check and ruff format --check (0.16.10, repo config) pass on the three files.

Additional Notes

None.

MultiLevelAllianceModel, PdGrid and EpsteinCivilViolence take their
parameters from a Scenario since #3493, but their docstrings still
listed the old keyword arguments (n/mean/std_dev/rng, width/height/
activation_order/payoffs, seed). Document them under scenario instead.
@github-actions github-actions Bot added ci Release notes label example Changes the examples or adds to them. labels Oct 28, 2026
@quaquel quaquel added the bug Release notes label label Oct 28, 2026
@quaquel quaquel added docs Release notes label and removed bug Release notes label ci Release notes label labels Oct 28, 2026
@quaquel
quaquel merged commit 12bf095 into mesa:main Oct 28, 2026
13 of 15 checks passed
@github-actions github-actions Bot added ci Release notes label and removed docs Release notes label labels Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Release notes label example Changes the examples or adds to them.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants