From 863b2490c727fd085f51e77fa86a6133579ebdbf Mon Sep 17 00:00:00 2001 From: Jan-Lukas Wynen Date: Wed, 13 Jul 2022 13:58:54 +0200 Subject: [PATCH] Configure tox --- tox.ini | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..9acb5e54 --- /dev/null +++ b/tox.ini @@ -0,0 +1,30 @@ +[tox] +envlist = py{38,39,310} +isolated_build = true + +[testenv] +deps = -r requirements/test.txt +commands = pytest + +[testenv:docs] +description = invoke sphinx-build to build the HTML docs +basepython = python3.8 +deps = {posargs:} + -r requirements/docs.txt +allowlist_externals = find +commands = python -m sphinx -j2 -v -b html -d {toxworkdir}/docs_doctrees docs html + python -m sphinx -j2 -v -b doctest -d {toxworkdir}/docs_doctrees docs html + find html -type f -name "*.ipynb" -not -path "html/_sources/*" -delete + +[testenv:linkcheck] +description = Run Sphinx linkcheck +deps = -r requirements/docs.txt +commands = python -m sphinx -j2 -v -b linkcheck -d {toxworkdir}/docs_doctrees docs html + +[testenv:static] +description = Code formatting and static analysis +basepython = python3.8 +skip_install = true +deps = -r requirements/static.txt +commands = black . + flake8 .