Skip to content

Commit 51022b5

Browse files
igerberclaude
andcommitted
Add ipython to docs deps so nbsphinx Pygments lexer resolves under -W
CI's new Sphinx HTML build (-W) failed with "Pygments lexer name 'ipython3' is not known [misc.highlighting_failure]" warnings on every .ipynb in docs/tutorials/. nbsphinx renders notebook code cells with the ipython3 lexer; that lexer ships with the IPython package and is not included in our docs extras. My local venv had IPython transitively (common dev dep), masking the gap. RTD has been emitting these warnings silently since it builds without -W. Added "ipython>=8.0" to all three sync'd surfaces: - pyproject.toml [project.optional-dependencies.docs] - .readthedocs.yaml post_install pip install - .github/workflows/docs-tests.yml sphinx-build job Verified locally with python3 -c "from pygments.lexers import get_lexer_by_name; print(get_lexer_by_name('ipython3'))" — returns <pygments.lexers.IPython3> when IPython is installed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 86cc916 commit 51022b5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/docs-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ jobs:
9292
# Keep in sync with pyproject.toml [project.optional-dependencies.docs]
9393
# and .readthedocs.yaml post_install. Skips the maturin/Rust build:
9494
# docs/conf.py imports diff_diff via sys.path from checked-out source.
95-
run: pip install "numpy>=1.20.0" "pandas>=1.3.0" "scipy>=1.7.0" "sphinx>=6.0" "pydata-sphinx-theme>=0.15" "sphinxext-opengraph>=0.9" "sphinx-sitemap>=2.5" "nbsphinx>=0.9" "matplotlib>=3.5"
95+
# ipython provides the 'ipython3' Pygments lexer that nbsphinx uses
96+
# for notebook code cells; without it -W fires highlighting_failure.
97+
run: pip install "numpy>=1.20.0" "pandas>=1.3.0" "scipy>=1.7.0" "sphinx>=6.0" "pydata-sphinx-theme>=0.15" "sphinxext-opengraph>=0.9" "sphinx-sitemap>=2.5" "nbsphinx>=0.9" "matplotlib>=3.5" "ipython>=8.0"
9698

9799
- name: Build docs with warnings as errors
98100
# SPHINXOPTS="-W" turns every Sphinx warning into a build failure.

0 commit comments

Comments
 (0)