Skip to content
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

DX: colorize sphinx-build output #33

Merged
merged 3 commits into from
Mar 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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