Skip to content

fixing the version switcher in the docs - #3743

Merged
tpike3 merged 13 commits into
mesa:mainfrom
dietcoke-17:docs/stable-version-switcher-only
Jun 22, 2026
Merged

tpike3 merged 13 commits into
mesa:mainfrom
dietcoke-17:docs/stable-version-switcher-only

Conversation

@dietcoke-17

Copy link
Copy Markdown
Contributor

this actually fix the version switcher in the read the docs , confy.py in docs folder actually generates the docs and in the switcher json link it previously has /en which was creating the problem so its a fix to that problem and followed up by #3738

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

"url": "https://mesa.readthedocs.io/en/latest/"

P2 Badge Keep the latest URL on the new path scheme

Because this change updates json_url and the v3.5.1 entry to the no-/en Read the Docs URL scheme, leaving the latest entry on https://mesa.readthedocs.io/en/latest/ makes the switcher send users back to the old path whenever they choose Latest. In the same environment where /en is the part that broke the switcher, this leaves one of the two remaining dropdown options broken.


"name": "v3.5.1",
"version": "v3.5.1",
"url": "https://mesa.readthedocs.io/v3.5.1/"

P2 Badge Add an entry matching the stable RTD version

conf.py still uses READTHEDOCS_VERSION as version_match, so on the stable Read the Docs build the active version is stable, but this JSON no longer contains any entry whose version is stable. PyData's switcher matches version_match against these version fields to label/highlight the current docs version, so stable pages will no longer have a matching current-version entry unless this keeps stable or maps the stable build to v3.5.1 in conf.py.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 -1.0% [-1.3%, -0.7%] 🔵 -0.7% [-0.9%, -0.5%]
BoltzmannWealth large 🔵 -1.3% [-1.6%, -0.9%] 🔵 +0.1% [-0.5%, +0.6%]
Schelling small 🔵 +1.1% [+0.7%, +1.5%] 🔵 +0.2% [-0.5%, +0.9%]
Schelling large 🔵 +1.4% [+0.8%, +2.1%] 🔴 +4.8% [+3.4%, +5.9%]
WolfSheep small 🔵 +0.5% [+0.0%, +1.0%] 🔵 +0.2% [-3.6%, +4.1%]
WolfSheep large 🔵 +0.7% [+0.1%, +1.3%] 🔵 +2.4% [+1.6%, +3.2%]
SugarscapeG1mt small 🔵 +0.6% [+0.4%, +0.9%] 🔵 -0.6% [-2.3%, +1.0%]
SugarscapeG1mt large 🔵 +0.3% [-0.4%, +1.0%] 🔵 +0.2% [-1.7%, +2.1%]
BoidFlockers small 🔵 -2.9% [-3.3%, -2.5%] 🔵 +0.7% [+0.3%, +1.1%]
BoidFlockers large 🔵 -3.1% [-3.5%, -2.6%] 🔵 +0.1% [-0.1%, +0.3%]

@dietcoke-17

Copy link
Copy Markdown
Contributor Author
{178D1365-CCD8-4570-A9C3-E9FD046C70A1} i have checked the pydata sphinx theme they have a similar dropdown if we want keep this or totally can drop this idea any of the things works which direction should we go once you confirm i can trim it down there

@tpike3

tpike3 commented Jun 17, 2026

Copy link
Copy Markdown
Member

@dietcoke-17 Great thanks for tracking this down. Can you fix the conflicts please?

To be clear my understanding is there is an organic read the docs that stores the previous versions so users can look through the history and this will now allow that. correct?

@dietcoke-17

Copy link
Copy Markdown
Contributor Author

Yes I can fix the conflicts actually but regarding the history i will let you know how we can do that is there any possible way

@dietcoke-17

Copy link
Copy Markdown
Contributor Author

Hey @tpike3 i got it this pr actually solves that problem
{155EAF1E-0E49-4804-AF0B-4A4F9B9CDD2C}
as we can see in the image and here is the full picture whats happening the below read the docs is by the addon documentation hosted by read the docs which serve similar type and the upper one is a more cleaner format both of them stores the version that we want to show and yes your thoughts are perfectly align to this that "there is an organic read the docs that stores the previous versions so users can look through the history and this will now allow that." so its just the fix that the version switcher was broken it basically fix that

@tpike3

tpike3 commented Jun 18, 2026

Copy link
Copy Markdown
Member

@dietcoke-17 I think this needs more a permanent fix that is part of the our github actions. This right now seems like a very brittle fix that would have to be updated each time we do a release. In addition, right now if you go to the drop down in the upper left on the generated docs form this PR https://mesa--3743.org.readthedocs.build/3743/ the options then disappear.

I would go to just one version selector upper left or lower right, and there must be a way to make a new release a part of the readthedocs so then the versions are available to users.

@EwoutH put together a very nice step by step guide on how we do a release. https://github.com/mesa/mesa/blob/main/CONTRIBUTING.md#releases.

Would you be able to update this PR so it updates the workflow and read the docs so as we do a release it generates the the drop down as your pydata theme picture above?

@EwoutH EwoutH 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.

Diff looks good, thanks.

Will let merge to another maintainer.

@dietcoke-17

Copy link
Copy Markdown
Contributor Author

@tpike3 sorry i didnt have that bigger picture & surely working on this and will make sure to fix this problem in this PR

@dietcoke-17

Copy link
Copy Markdown
Contributor Author

@tpike3 i have updated as you have diretected and updated the workflow so whenever their is a new update the workflow will make sure with new release it generates the the drop down as well as update with new version

@tpike3

tpike3 commented Jun 21, 2026

Copy link
Copy Markdown
Member

@dietcoke-17 Thanks. Looking at the read the docs from the PR, https://mesa--3743.org.readthedocs.build/3743/, it still does not seem to be having the desired impact. the switcher in the upper left is only in latest. While stable and 3.5.1 does not have it.

I do not want to send you chasing for improvements beyond your original PR. So, if you want you can go back to the original simpler PR, with the goal that their is only the switcher in the bottom right. Or, you can continue to pursue this more automated version. Entirely up to you. Either way we appreciate the work you are putting into this!

@dietcoke-17

Copy link
Copy Markdown
Contributor Author

@tpike3 as currently in my local in both latest and v3.5.1 both were properly working and the dropdown working smoothly and as you hav directed in the pr #3738 directed only two version due to a mistake in the confy.py file the stable version remained unchanged and also i have mentioned it eariler now both latest and v3.5.1 works smoothly we can see in the readthe docs build you might contradict with the fact that whenever you click on the v3.5.1 version it actually redirect you to the version which is currently present without this merged pr after this pr the fix will be automatically can be seen i think this fixes the issue i have checked every possible angle why it wont fail.

@tpike3

tpike3 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Thanks @dietcoke-17

@tpike3
tpike3 merged commit ca7240d into mesa:main Jun 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants