Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
DOC/BUILD add ability for conf to skip whole sections#24907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
if this was gonna go in, any way to pass in the exclusions on the command line? |
I think via environment variables is the only way and that is pretty ugly. Even command line is pretty ugly with a bunch of excludes. |
Uh oh!
There was an error while loading.Please reload this page.
I’m wondering whether it would be easy or desirable to do it with some sort of config file that is git-ignored. Then you could set it to whatever you like for local building and not need to revert each time you push. Downside would be that I guess it would persist when you check out some other branch. I would likely forget about it and get confused about what’s going on with my doc build… |
could add a line to the conf printing excluded folders/files |
Possibly hard to spot amongst all the other output from the doc build? |
story645 commentedJan 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This commit adds a It would be pretty easy to add a config file for this, but I hesitate just because I don't quite understand how that actually is git ignored. Either we distribute an example config file, or we don't. If we don't, then adding it to the gitignore is fine, but then users need to make it themselves by hand. Is that what we want? |
@jklymak fair point. It occurs to me that the contributor could also just not stage their |
I do But I guess having the user make a eg.
should work. |
Uh oh!
There was an error while loading.Please reload this page.
00b53a6
to47ad4a2
CompareOK, latest commit does this via a yaml. |
Any chance you have a windows machine to update the make.bat? Otherwise thats a good first issue follow up. I think here it's gonna be basically the same command? ) |
I just pushed a change to make.bat. No idea if it works ;-) |
8b612e5
tobcb08ea
CompareUh oh!
There was an error while loading.Please reload this page.
1290285
tode27da7
CompareRebased so all tests should pass. I know folks are busy with the release, but I'll agitate for this one a bit. a) it's a huge convenience for folks who are just changing a small part of the docs and b) it's also not user-facing, so the interface need not be set in stone. I've updated the proposal in the description above. |
QuLogic commentedJan 12, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As a note, one can set something in |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
e2b90ac
to7047f32
CompareUh oh!
There was an error while loading.Please reload this page.
814f9cd
to0896b1f
Compare0896b1f
to2541f23
Comparesquashed... |
I'll self merge this, because I want to use it ;-) and it's not at all user-facing. |
It did have two approvals. Thanks@jklymak I am using this already 👍 |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
UPDATE: 11 Jan:
The doc build is painfully slow. This gives devs an easy way to populate
exclude_patterns
inconf.py
with subdirectories they do not want while they are doing development,and to not do the gallery builds if those subdirectories are excluded. Of course the resulting build is broken with dropped references etc, so the developer should putconf.py
back to its pristine state, but this should be a handy tool.Note to build just the
user
subdirectory using this takes 5s on my machine (if I exclude theprev_whats_new
).Closes#24906
Behaviour:
The interface is
make html-skip-subdirs
which calls$(SPHINXBUILD) -D skip_sub_dirs=1 -b html ...
.It tries to read
doc/.mpl_skip_subdirs.yaml
. If that does not exist, that file is created and looks like:If all of
gallery/*
(etc) is skipped, then sphinx-gallery does not get run on that subdirectory. OTOH if only subdirectories of it are skipped, then the whole gallery is run (only once though, if gallery not previously generated).With the above default the
users/*
directory is built in 5 seconds on my machine, in contrast to the full doc build that takes upwards of 10 minutes.PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst