Summary
The .codespell/test_data/test_notebook.ipynb file inside docs/source/ is picked up by Sphinx during documentation builds, causing a build failure:
sphinx.errors.ThemeError: An error happened in rendering the page .codespell/test_data/test_notebook.
Reason: NotADirectoryError(20, 'Not a directory')
Steps to reproduce
- Clean the docs build cache:
make cleandocs
- Build the docs:
make html
- The build fails with the error above.
The issue may not always surface if there is a stale docs/_build cache, but it reliably reproduces on a clean build.
Root cause
The .codespell/test_data/ directory (added in commit 54ff563) lives inside docs/source/, which is the Sphinx source root. Sphinx discovers all .ipynb files under this directory via the myst-nb parser, including test fixtures that are not intended to be documentation pages.
The current exclude_patterns in docs/source/conf.py only excludes _build, Thumbs.db, and .DS_Store — it does not exclude .codespell.
Proposed fix
Add .codespell to the exclude_patterns list in docs/source/conf.py:
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".codespell"]
Alternatively, the .codespell/test_data/ directory could be moved outside of docs/source/ entirely (e.g. to tests/codespell/), but the exclude pattern is the minimal fix.
Summary
The
.codespell/test_data/test_notebook.ipynbfile insidedocs/source/is picked up by Sphinx during documentation builds, causing a build failure:Steps to reproduce
make cleandocsmake htmlThe issue may not always surface if there is a stale
docs/_buildcache, but it reliably reproduces on a clean build.Root cause
The
.codespell/test_data/directory (added in commit 54ff563) lives insidedocs/source/, which is the Sphinx source root. Sphinx discovers all.ipynbfiles under this directory via themyst-nbparser, including test fixtures that are not intended to be documentation pages.The current
exclude_patternsindocs/source/conf.pyonly excludes_build,Thumbs.db, and.DS_Store— it does not exclude.codespell.Proposed fix
Add
.codespellto theexclude_patternslist indocs/source/conf.py:Alternatively, the
.codespell/test_data/directory could be moved outside ofdocs/source/entirely (e.g. totests/codespell/), but the exclude pattern is the minimal fix.