[tox]
minversion = 1.6
-envlist = docs,docs-linkcheck
+envlist = pre-commit,docs
skipsdist = true
[testenv:docs]
-deps = -rrequirements.txt
+basepython = python3
+deps = -rdocs/requirements.txt
commands =
- sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
- echo "Generated docs available in {toxinidir}/docs/_build/html"
-whitelist_externals = echo
+ sphinx-build -j auto -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
[testenv:docs-linkcheck]
-deps = -rrequirements.txt
-commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+basepython = python3
+deps = -rdocs/requirements.txt
+commands = sphinx-build -j auto -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
+[testenv:pre-commit]
+basepython = python3
+deps = pre-commit
+commands =
+ pre-commit install
+ pre-commit install --hook-type commit-msg
+ pre-commit run --all-files