Skip to content

Commit

Permalink
Configure tox
Browse files Browse the repository at this point in the history
  • Loading branch information
jl-wynen committed Jul 13, 2022
1 parent d9bd443 commit 863b249
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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 .

0 comments on commit 863b249

Please sign in to comment.