Make gallery docs resilient to dataset outages - #62
Closed
snesmaeili wants to merge 2 commits into
Closed
Conversation
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 96.08% 96.09% +0.01%
==========================================
Files 65 65
Lines 8170 8170
Branches 1420 1420
==========================================
+ Hits 7850 7851 +1
Misses 152 152
+ Partials 168 167 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
snesmaeili
added a commit
that referenced
this pull request
Aug 10, 2026
Two small guards, complementary to #62 (which fixes why the build currently fails). These address how a failed or empty build reaches the live site. Refuse to deploy a build with no index.html. The GitHub Pages deploy uses force_orphan, so it replaces the entire published tree. The last successful deploy (2026-08-04) published a tree containing only .nojekyll and _sphinx_design_static -- no index.html anywhere -- which is why https://mne.tools/mne-denoise/ currently returns 404 for every page. A build that did not produce index.html and auto_examples/index.html should never be allowed to replace a working site. Add a "*" wildcard to the sphinx-gallery subsection_order. Adding any new examples/ subdirectory that contains .py files currently raises sphinx.errors.ConfigError: The subsection folder '../examples/<name>' was not found in the 'subsection_order' config. and fails the entire documentation build. The wildcard sorts unlisted folders to the end instead. (examples/tutorials and examples/output escape this today only because neither contains a .py file.) Verified with the CI invocation locally, sphinx -b html -W --keep-going: build succeeded, 194 HTML pages, 0 warnings, 36 gallery examples. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6GFfnt85ZSjuRaDrETwpU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sys.exitsys.exit(0)paths with contextual failures for requested full-data buildsRoot cause
The documentation job depended on the external NoiseTools host, which currently returns HTTP 503. In addition, two EEGBCI examples caught download failures and called
sys.exit(0), allowing the entire Sphinx process to stop early with a success status. This could produce an incomplete documentation artifact while CI appeared green.Sphinx-Gallery's
filename_patterncontrols execution without removing source pages. CI now opts into a reviewed deny list throughMNE_DENOISE_DOCS_EXECUTE_EXTERNAL_DATA=false; the environment variable remains unset by default, so local builds retain full execution.Validation
pytest tests/test_docs_gallery.py -q(2 passed)pytest tests/test_docs_gallery.py -q(2 passed)pre-commit run --all-files(all hooks passed)python -m sphinx -M html . _build-ci -W --keep-goingbuild succeededterminal stateScope
This changes documentation execution policy and example failure reporting only. It does not replace scientific datasets, inject synthetic stand-ins, or change denoising method behavior.