-
Notifications
You must be signed in to change notification settings - Fork 340
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update tox configuration for building docs #1206
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1206 +/- ##
=======================================
Coverage ? 96.99%
=======================================
Files ? 71
Lines ? 7050
Branches ? 0
=======================================
Hits ? 6838
Misses ? 212
Partials ? 0 Continue to review full report at Codecov.
|
Building the docs in nitpicky mode: build finished with problems, 1466 warnings. Huh. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes themselves look good! I can approve it now while we wait for the other PRs to go into main.
tox.ini
Outdated
@@ -41,14 +41,21 @@ changedir = {toxinidir} | |||
extras = docs | |||
setenv = | |||
HOME = {envtmpdir} | |||
commands = sphinx-build docs docs{/}_build{/}html -W -b html | |||
commands = sphinx-build docs docs{/}_build{/}html -W --keep-going -j=auto -b html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commands = sphinx-build docs docs{/}_build{/}html -W --keep-going -j=auto -b html | |
commands = sphinx-build docs docs{/}_build{/}html -W --keep-going -b html {posargs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox -- -j=auto
in github action workflow
From today's meeting...
|
When writing documentation, please make sure to fix any warnings that | ||
arise. To enforce this, the ``build_docs`` and ``build_docs_nitpicky`` | ||
tox_ environments will fail after completing the documentation build | ||
if they encountered any warnings (via the ``-W`` and ``--keep-going`` | ||
flags to `sphinx-build`_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you like to add a github action for nitpicky
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, but I would really like to once all of the ∼10³ nitpicky
warnings → errors are resolved. That's going to take some time and might also depend on #1158 (and/or maybe #1149?) to be resolved to define what optional
, etc. mean in the parameters section of docstrings. Eventually a GitHub Action for nitpicky
would be great!
Co-authored-by: Erik Everson <[email protected]>
… tox-docs-nitpicky
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
* Add build_docs_nitpicky test thing to tox.ini * Continue doc build after a warning when using -W option * Add --parallel=auto flag to doc builds with tox * Fix parallel argument to sphinx-build for tox * Fix order of options * Add changelog entry for tox docs env updates * Update doc guide on tox environments * Add changelog entry for updating doc guide regarding tox envs * Update doc guide section on tox docs builds * Fix reST link * Remove auto parallelization for doc builds via tox * Separate changelog entries * Further details on the -j flag for parallelization in doc builds Co-authored-by: Erik Everson <[email protected]> * Separate changelog entries * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Erik Everson <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add build_docs_nitpicky test thing to tox.ini * Continue doc build after a warning when using -W option * Add --parallel=auto flag to doc builds with tox * Fix parallel argument to sphinx-build for tox * Fix order of options * Add changelog entry for tox docs env updates * Update doc guide on tox environments * Add changelog entry for updating doc guide regarding tox envs * Update doc guide section on tox docs builds * Fix reST link * Remove auto parallelization for doc builds via tox * Separate changelog entries * Further details on the -j flag for parallelization in doc builds Co-authored-by: Erik Everson <[email protected]> * Separate changelog entries * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Erik Everson <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This makes/proposes a few changes:
build_docs_nitpicky
, that issues warnings for missing links.--keep-going
flag when we have the-W
flag. This way the test doc build will keep going after a warning, which will let us fix multiple warnings at the same time instead of having to wait for the doc build run multiple times.--parallel=auto
. This is experimental, and does notmake the change in GitHub Actionsalter our GitHub Actions setup, so as far as I can tell, the doc builds there will still only be done on one core rather than in parallel. (edited as a clarification)