| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
if this was gonna go in, any way to pass in the exclusions on the command line? |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
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… |
Sorry, something went wrong.
could add a line to the conf printing excluded folders/files |
Sorry, something went wrong.
Possibly hard to spot amongst all the other output from the doc build? |
Sorry, something went wrong.
I'd put it at the very top b/f the sphinx generated output, where there really isn't much: also possibly add a space/ "SPHINX OUTPUT BEGINS NOW" header between these two sections. |
Sorry, something went wrong.
|
This commit adds a make html-skip-dirs option, and make html goes back to a full build. Still have to edit the conf.py. 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? |
Sorry, something went wrong.
|
@jklymak fair point. It occurs to me that the contributor could also just not stage their conf.py changes. Though that for me would mean having to break the git commit -a habit! |
Sorry, something went wrong.
|
I do commit -a all the time as well. But I'd do git restore conf.py to get it back to its original state. But I guess having the user make a skip-dir.yml or something isn't very hard and could be in the comments of Makefile eg. skip_dirs: users/prev_whats_new/* - gallery/* - api/* - tutorials/* - plot_types/* - devel/* should work. |
Sorry, something went wrong.
|
OK, latest commit does this via a yaml. make html-skip-subdirs will make doc/.mpl_skip_subdirs.yaml with a default minimal build. The user can add or subtract entries to this (including commenting things out). Or if they remove it, it will get generated again when make html-skip-subdirs is called. This is .gitignore-d |
Sorry, something went wrong.
|
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? ) |
Sorry, something went wrong.
|
I just pushed a change to make.bat. No idea if it works ;-) |
Sorry, something went wrong.
|
Rebased 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. |
Sorry, something went wrong.
|
As a note, one can set something in conf.py from the command line via -D setting=value. However, I believe that doing so would mean that you could not check that value within the file itself, and you would need to move the processing of the value to another extension. |
Sorry, something went wrong.
|
squashed... |
Sorry, something went wrong.
|
I'll self merge this, because I want to use it ;-) and it's not at all user-facing. |
Sorry, something went wrong.
|
It did have two approvals. Thanks @jklymak I am using this already 👍 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
UPDATE: 11 Jan:
The doc build is painfully slow. This gives devs an easy way to populate exclude_patterns in conf.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 put conf.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 the prev_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
Release Notes