Skip to content

Point the meta-agents docs at mesa.experimental.meta_agents - #3957

Merged
tpike3 merged 2 commits into
mesa:mainfrom
AshNicolus:docs/meta-agents-import-path
Oct 20, 2026
Merged

tpike3 merged 2 commits into
mesa:mainfrom
AshNicolus:docs/meta-agents-import-path

Conversation

@AshNicolus

Copy link
Copy Markdown
Contributor

Pre-PR Checklist

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

Summary

The meta-agents docs import from mesa.meta_agents, which no longer exists. Anyone copying the examples from the migration guide or the API page gets a ModuleNotFoundError, and the API reference section for meta-agents is empty on the docs site. This PR points them at mesa.experimental.meta_agents.

Bug / Issue

#3875 moved meta-agents back to mesa.experimental.meta_agents (and updated test_import_namespace.py to match), but the docs weren't part of that change.

from mesa.meta_agents import MetaAgents   # as in the docs today
# ModuleNotFoundError: No module named 'mesa.meta_agents'

The API page's automodule fails the same way, so Sphinx logs a warning and renders no API reference:

WARNING: autodoc: failed to import 'meta_agents' from module 'mesa'
ModuleNotFoundError: No module named 'mesa.meta_agents'

Implementation

  • docs/migration_guide.md: fixed the import in the example, and the heading and first sentence, which said meta-agents moved out of experimental.
  • docs/apis/meta_agents.md: fixed the import in the example and the automodule target.

Testing

  • Ran the code examples from both pages with the new import and they work. The API page has two separate examples, and each runs on its own.
  • Built the docs with Sphinx before and after. On main the meta-agents page has no API reference and Sphinx warns as above. With this change it builds without that warning and documents MetaAgents and its methods.
  • pre-commit passes, and Vale reports nothing new on the changed lines.

Additional Notes

The warehouse example in mesa-examples imports from mesa.meta_agents too, which is part of why the examples CI job is failing. I'll fix that in a separate PR on mesa-examples.

mesa#3875 moved meta-agents back to mesa.experimental.meta_agents, but the
migration guide and the API page still import from mesa.meta_agents,
which no longer exists. Copying the examples fails with
ModuleNotFoundError, and the API page's automodule can't import the
module, so the reference section is empty on the docs site.

Update the imports and the automodule target, and fix the migration
guide heading, which said meta-agents moved out of experimental.
@github-actions github-actions Bot added the docs Release notes label label Oct 20, 2026

@tpike3 tpike3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the catch @AshNicolus

@tpike3
tpike3 merged commit b3b58bd into mesa:main Oct 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants