DOC: omit basic_units helper from gallery by LiJzd · Pull Request #31909 · matplotlib/matplotlib
DOC: omit basic_units helper from gallery
PR summary
This PR prevents galleries/examples/units/basic_units.py from 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
- "closes #0000" is in the body of the PR description to link the related issue
- new and changed code is tested
- [N/A] Plotting related features are demonstrated in an example
- [N/A] New Features and API Changes are noted with a directive and release note
- Documentation complies with general and docstring guidelines
Testing
git diff --checkpython -m py_compile doc/conf.py- Local regex check confirming:
../galleries/examples/units/basic_units.pymatchesignore_pattern../galleries/examples/units/basic_units.pymatchescopyfile_regex- ordinary
.rstfiles still matchcopyfile_regex - ordinary example
.pyfiles such asbar_unit_demo.pydo not match either rule
Full documentation build was not run locally because this environment does not have Matplotlib's documentation dependencies installed, including sphinx_gallery.