Skip to content

Exclude jupyter_execute output from documentation build#122

Merged
timkpaine merged 1 commit into
mainfrom
exclude-jupyter-execute
Jul 18, 2026
Merged

Exclude jupyter_execute output from documentation build#122
timkpaine merged 1 commit into
mainfrom
exclude-jupyter-execute

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Summary

myst-nb writes executed notebooks into a jupyter_execute directory inside the source tree. Because yardang builds with the source root at the project root and jupyter_execute was not excluded, each rebuild re-read that output as source and nested it deeper:

docs/jupyter_execute/docs/jupyter_execute/docs/jupyter_execute/docs/notebooks/example

Eventually the build fails with a missing doctree, e.g.:

FileNotFoundError: .../docs/html/.doctrees/docs/jupyter_execute/docs/jupyter_execute/docs/jupyter_execute/docs/notebooks/example.doctree

This adds jupyter_execute (at any depth) to exclude_patterns so Sphinx never picks the executed-notebook output back up as source.

Verification

Checked with Sphinx's own sphinx.util.matching.Matcher:

  • Excluded: docs/jupyter_execute/... and arbitrarily-nested .../jupyter_execute/.../jupyter_execute/...
  • Kept: real sources like docs/notebooks/example and docs/src/configuration

Note for existing checkouts: delete any already-nested output before rebuilding — rm -rf docs/jupyter_execute docs/html (both gitignored).

myst-nb writes executed notebooks into a jupyter_execute directory inside
the source tree. With the source root at the project root, each rebuild
re-read that output as source and nested it deeper
(jupyter_execute/.../jupyter_execute/...), eventually failing with a
missing .doctree path. Exclude jupyter_execute at any depth so it is
never picked up as source.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

67 tests  ±0   67 ✅ ±0   19s ⏱️ -2s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 2d4146f. ± Comparison against base commit 5e4a5e7.

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.72%. Comparing base (5e4a5e7) to head (2d4146f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #122   +/-   ##
=======================================
  Coverage   83.72%   83.72%           
=======================================
  Files          10       10           
  Lines        1456     1456           
  Branches      150      150           
=======================================
  Hits         1219     1219           
  Misses        198      198           
  Partials       39       39           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timkpaine
timkpaine merged commit d47e384 into main Jul 18, 2026
4 checks passed
@timkpaine
timkpaine deleted the exclude-jupyter-execute branch July 18, 2026 19:51
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.

1 participant