{{ message }}
DOC: omit basic_units helper from gallery#31909
Open
LiJzd wants to merge 4 commits into
Open
Conversation
story645
reviewed
Jun 16, 2026
Author
There was a problem hiding this comment.
Thanks. The notebook is only there because once basic_units.py is ignored as a gallery example but still copied for the :download: links, Sphinx Gallery's all-notebooks zip step expected a matching basic_units.ipynb and the docs build failed without it.
I agree it is awkward. I can look for a cleaner Sphinx Gallery configuration that keeps basic_units.py available for the examples' download links without adding a placeholder notebook. The latest CircleCI docs build is green with this workaround.
Author
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.

DOC: omit basic_units helper from gallery
PR summary
This PR prevents
galleries/examples/units/basic_units.pyfrom being rendered as a standalone gallery page. The file is a helper module used by the units examples, not a visual gallery example, and issue #17479 notes that it should likely be omitted from the gallery listing.The file is still copied into the generated gallery output via
copyfile_regex, so existing examples can continue to import it and users can still download it from links such as:download:\basic_units.py <basic_units.py>``.Addresses one item from #17479.
AI Disclosure
I used Codex to inspect the issue, read the repository documentation, identify the smallest scoped change, and run local checks. I reviewed the resulting configuration change and verified the regex behavior locally.
PR checklist
Testing
git diff --checkpython -m py_compile doc/conf.py../galleries/examples/units/basic_units.pymatchesignore_pattern../galleries/examples/units/basic_units.pymatchescopyfile_regex.rstfiles still matchcopyfile_regex.pyfiles such asbar_unit_demo.pydo not match either ruleFull documentation build was not run locally because this environment does not have Matplotlib's documentation dependencies installed, including
sphinx_gallery.