Skip to content

Fix intermittent missing fit plots in docs - #67

Merged
shum23 merged 5 commits into
mainfrom
fix-intermittent-missing-fit-plots-in-docs
Jul 27, 2026
Merged

Fix intermittent missing fit plots in docs#67
shum23 merged 5 commits into
mainfrom
fix-intermittent-missing-fit-plots-in-docs

Conversation

@shum23

@shum23 shum23 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

The interactive fit plots in the docs (e.g. 6_data_fitting.ipynb) would sometimes fail to appear and leave a blank space where the sliders and figure should be. Refreshing the page sometimes fixed it, sometimes didn't. It also seemed to vary by browser.

It turns out both sphinx and bokeh try to load MathJax, and whether this caused a crash depended on which one loaded first. That's why it looked random.

Bokeh 3.9's bundled MathJax uses MathJax 3 API and is still migrating to v4 but Sphinx recently switched its default to MathJax 4 in v9.0, see sphinx.ext.mathjax

Pin mathjax_path to MathJax 3 in docs/source/conf.py as a workaround according to sphinx's docs, matching what bokeh's bundle expects.

Note: Should revisit if/when bokeh adds mathjax 4 support.

Also reduced the embedded states of the fit plots there to make them manageable for docs builds

@shum23
shum23 marked this pull request as ready for review July 27, 2026 14:35
@shum23
shum23 requested a review from phrgab July 27, 2026 14:38

@phrgab phrgab left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

There appear to be formatting changes only on file_loaders.md, unrelated to the fixes - is that correct? If so, are you able to drop these changes before we merge?

@shum23

shum23 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

There appear to be formatting changes only on file_loaders.md, unrelated to the fixes - is that correct? If so, are you able to drop these changes before we merge?

Thanks @phrgab. That's just down to ruff linting. Dropping them would cause the linting CI to fail.

@shum23
shum23 merged commit 44b9a7b into main Jul 27, 2026
4 checks passed
@shum23
shum23 deleted the fix-intermittent-missing-fit-plots-in-docs branch July 27, 2026 15:01
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.

2 participants