This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Add a docs build (with error checking) option to the dev_menu.py script #13682
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.
Description
This PR extends the
dev_menu.py
script to give it a docs build option. 🔥It leverages the existing
deploy_docs
function from CI that is basically a straight call tomake docs SPHINXOPTS=-W
. This will check your build for docs errors, so this makes it just a little more easier to test your dev work before making a PR.As with any
make docs
run, make sure you update/docs/settings.ini
to choose which doc sets to run, otherwise you're running them all! 😲Comments
Unrelated to this change is that while getting the script to function, I noticed the script has a couple of deviations in requirements from a standard user installation of MXNet. These aren't in our user setup scripts:
yaml
Python module (pip install)ccache
(apt install)So to run this script you need these!
I tried using a docker variation for giggles and ran into security issues at one point, so there are probably some additional config steps to make the docker options work for a regular user.
It also requires Python 3. It will fail to run on Python 2 (around line 75). I think that since we still support Python 2 the script should be updated accordingly. Again, this has nothing to do with this feature I'm adding. I'm just commenting on the current situation with the script that is already in the repo.
Experimental
I experimented with adding an option to run the full website build since that would be pretty cool to offer for easy dev & testing, but I put that off after seeing that it's not quite setup to handle a bunch of parameters. Sure, it could be done, but I didn't want to make so many changes without discussing the best approach. I had a --website option going that took in the 5 params needed, but then found I'd need to rewrite/extend the commands functions, so I didn't. Saving this kind of update for later since I'd also like to make it easy to pick which doc set(s) to run (python/c/scala/java/clojure/r/etc). Ping me if anyone wants to help with that.