Skip to content

Fix some gallery files not being executed#2792

Draft
echedey-ls wants to merge 14 commits into
pvlib:mainfrom
echedey-ls:fix_some_examples_not_run_by_sphinx
Draft

Fix some gallery files not being executed#2792
echedey-ls wants to merge 14 commits into
pvlib:mainfrom
echedey-ls:fix_some_examples_not_run_by_sphinx

Conversation

@echedey-ls

@echedey-ls echedey-ls commented Jun 18, 2026

Copy link
Copy Markdown
Member
  • Closes Missing thumbnails in the example gallery #2790
  • I am familiar with the contributing guidelines
  • I attest that there is no AI-generated material in this PR, just like the good old days
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Other suggestions for the prefix welcome. I left a warning in NX_oedi9068.py to explicitly state it is not run by documentation. I don't really care but I thought it may be useful to hint users before running.

@echedey-ls

echedey-ls commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

regex ^(?!.*/)*((?!/NX_).)*$ was tested with the following test batch:

# True negatives
/NX_test1.py
/NX_oedi.py
/NX_.rst
/NX_.py
/NX__.py
/home/echedey/Documents/10_Programming/pvlib-python/docs/examples/system-models/NX_oedi_9068.py
# These are considered negatives; I differ a little bit but I don't know how feasible is to make the regex match so
/NX_/hello.py
/NX_what/hello.py
# True positives
/index.rst
/plot_test1.py
/plot_oedi.py
/oedi.py
/__lalilailola__.py
/white spaces.py
/special chars?.py
/is_middle_NX_detected.py
/home/echedey/Documents/10_Programming/pvlib-python/docs/examples/system-models/oedi_9068.py

https://regex101.com/ - remember to change to python flavor if you try it.

Edit: updated regex and test data at 00h30 UTC 2026-06-19

Last edit: I invite anybody on windows to try this out, I only checked on linux which is enough for the readthedocs builds, but you may want to check windows users can use this locally too.

@echedey-ls echedey-ls marked this pull request as draft June 19, 2026 13:36
@echedey-ls echedey-ls force-pushed the fix_some_examples_not_run_by_sphinx branch from 8d1f58e to 3bad2f2 Compare June 19, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing thumbnails in the example gallery

1 participant