Skip to content

Commit

Permalink
DX: colorize sphinx-build output (#33)
Browse files Browse the repository at this point in the history
* DX: pass all environment variables in `tox` config

* MAINT: sort config keys in `tox.ini`
  • Loading branch information
redeboer authored Mar 7, 2023
1 parent f561f0c commit fcc9d08
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[tox]
passenv = PYTHONPATH
skip_install = True
skip_missing_interpreters=true
skipsdist = True
Expand All @@ -9,16 +8,14 @@ envlist =
sty,

[testenv]
description =
Run all fast unit tests
allowlist_externals =
pytest
commands =
pytest {posargs:tests}
description =
Run all fast unit tests

[testenv:cov]
description =
Compute the test coverage of all unit tests
allowlist_externals =
pytest
commands =
Expand All @@ -28,10 +25,10 @@ commands =
--cov-report=xml \
--cov=boostcfg \
--cov=pawian
description =
Compute the test coverage of all unit tests

[testenv:doc]
description =
Build documentation and API through Sphinx
allowlist_externals =
sphinx-build
commands =
Expand All @@ -41,10 +38,13 @@ commands =
-TW \
-b html \
docs/ docs/_build/html
description =
Build documentation and API through Sphinx
passenv = *
setenv =
FORCE_COLOR = yes

[testenv:doclive]
description =
Set up a server to preview changes to the HTML pages live
allowlist_externals =
sphinx-autobuild
commands =
Expand All @@ -56,24 +56,25 @@ commands =
--re-ignore docs/api/.* \
--open-browser \
docs/ docs/_build/html
description =
Set up a server to preview changes to the HTML pages live
passenv = *
setenv =
FORCE_COLOR = yes

[testenv:docnb]
description =
Execute Jupyter notebooks and build documentation with Sphinx
allowlist_externals =
sphinx-build
passenv =
TERM
setenv =
EXECUTE_NB = yes
commands =
sphinx-build -nW --keep-going -b html docs/ docs/_build/html
description =
Execute Jupyter notebooks and build documentation with Sphinx
passenv = *
setenv =
EXECUTE_NB = yes
FORCE_COLOR = yes

[testenv:linkcheck]
description =
Check external links in the documentation (requires internet connection)
passenv =
EXECUTE_NB
allowlist_externals =
sphinx-build
commands =
Expand All @@ -82,11 +83,16 @@ commands =
-T \
-b linkcheck \
docs/ docs/_build/linkcheck
description =
Check external links in the documentation (requires internet connection)
passenv = *
setenv =
FORCE_COLOR = yes

[testenv:sty]
description =
Perform all linting, formatting, and spelling checks
allowlist_externals =
pre-commit
commands =
pre-commit run {posargs} -a
description =
Perform all linting, formatting, and spelling checks

0 comments on commit fcc9d08

Please sign in to comment.