Skip to content

docs: remove unused file mesa.md - #4065

Merged
quaquel merged 6 commits into
mesa:mainfrom
arzaanxeng:trim-mesa-md
Nov 12, 2026
Merged

quaquel merged 6 commits into
mesa:mainfrom
arzaanxeng:trim-mesa-md

Conversation

@arzaanxeng

@arzaanxeng arzaanxeng commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Pre-PR Checklist

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

Summary

Removes docs/mesa.md, a leftover page that is not used anywhere in the docs.

Bug / Issue

docs/mesa.md is a leftover from sphinx-apidoc. It is not in any toctree (the build warns "document isn't included in any toctree") and nothing links to it. It also causes build problems:

  • It has a mesa.main section for a module that does not exist, which gives an import failure on every build.
  • It duplicates the documentation of mesa.agent, mesa.datacollection and mesa.model, which are already documented under docs/apis/. This causes duplicate object description warnings.

Implementation

  • Deleted docs/mesa.md.
  • Added viewcode_follow_imported_members = False in docs/conf.py. Without it, some [docs] links on the generated source pages point to anchors that do not exist. With it, they go to where the object is documented (for example apis/model.html).

Testing

Built the docs with and without the file (clean builds, notebooks off):

python -m sphinx -E -a -b html -D nb_execution_mode=off . _build
With mesa.md Without mesa.md
Total warnings 170 88

No broken links or unresolved references appeared after the deletion. Total warning counts vary by environment, so the remaining warnings are not caused by this PR.

Additional Notes

The top-level shortcut names mesa.Model, mesa.Agent and mesa.DataCollector were only documented on this page and are no longer documented. The real entries under docs/apis/ (for example mesa.model.Model) are unchanged.

@github-actions github-actions Bot added the docs Release notes label label Nov 10, 2026
@atul-upadhyay-7

Copy link
Copy Markdown
Contributor

Checked 71b96066: clean before/after builds confirm the cleanup removes the mesa.main import warning and reduces duplicate-object warnings from 51 to 17. The mesa.Agent, mesa.Model and mesa.DataCollector targets remain.

One regression needs fixing before merge: the generated source pages have 16 new broken [docs] backlinks. For example, _modules/mesa/agent.html still points to mesa.html#mesa.agent.Agent, but that anchor was removed; the class now lives at apis/agent.html#mesa.agent.Agent. The same happens for Model and several methods. A fresh -E -a build still reproduces this, so it is not a stale build artifact.

Please keep the cleanup but fix those source backlinks. Adding viewcode_follow_imported_members = False in docs/conf.py is one tested option: the generated-site fragment audit goes from 33 broken links to 0, while the top-level aliases remain. It also removes source links for imported re-exports, so a narrower fix is fine if you'd rather preserve those links. Please don't use :no-index: on the retained automodule:: mesa block; that removes the top-level alias anchors too.

Also, please move the description into the bug PR template and fill in its sections. The current explanation and build evidence can be reused. The build totals vary with the environment, so the remaining warnings should not be treated as caused by this PR.

@arzaanxeng

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed check. I added viewcode_follow_imported_members = False in docs/conf.py, so the [docs] backlinks now resolve (e.g. Model's [docs] goes to apis/model.html). I kept the top-level mesa.Agent / mesa.Model / mesa.DataCollector anchors and did not use :no-index:. I also moved the description into the bug PR template.

@atul-upadhyay-7

Copy link
Copy Markdown
Contributor

checked the updated version, the fix looks good to me. lgtm

@quaquel

quaquel commented Nov 12, 2026

Copy link
Copy Markdown
Member

Is there any place where we link to mesa.md? I can't find it, in which case the entire file might be redundant.

@arzaanxeng

Copy link
Copy Markdown
Contributor Author

I kept the file at first because I was worried that deleting it would break the docs build or the mesa.Model / mesa.Agent references, so I only removed the duplicate and broken parts. I didn't check whether anything actually links to the page itself.

I checked now: it isn't in any toctree (the build warns "document isn't included in any toctree") and nothing links to it. I built the docs with and without it and got 170 warnings with mesa.md included and 88 without it and no broken links or unresolved references.

The only thing lost is the top-level mesa.Model / mesa.Agent / mesa.DataCollector anchors (the real pages under apis/ stay). Should I delete the whole file in this PR? I'd keep viewcode_follow_imported_members = False in conf.py either way, since without it some [docs] backlinks are still broken.

@quaquel

quaquel commented Nov 12, 2026

Copy link
Copy Markdown
Member

The only thing lost is the top-level mesa.Model / mesa.Agent / mesa.DataCollector anchors (the real pages under apis/ stay).

Not sure what you mean with this. But given that it is not used, removing seems more sensible.

@arzaanxeng arzaanxeng changed the title docs: remove duplicate and broken sections from mesa.md docs: remove unused file mesa.md Nov 12, 2026
@arzaanxeng

Copy link
Copy Markdown
Contributor Author

I have deleted the file . By "anchors" I meant the duplicate shortcut entries mesa.Model / mesa.Agent / mesa.DataCollector that lived on that page , the real entries under apis/ are unchanged. I have also updated the title and description .

@quaquel
quaquel merged commit 2d9b251 into mesa:main Nov 12, 2026
16 of 17 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.

3 participants