-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
24 lines (21 loc) · 883 Bytes
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[tox]
envlist = py310
isolated_build = true
[testenv]
deps = -r requirements/test.txt
commands = pytest
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
deps = -r requirements/docs.txt
allowlist_externals=find
commands = python -m sphinx -j2 -v -b html -d {toxworkdir}/docs_doctrees docs html
find html -type f -name "*.ipynb" -not -path "html/_sources/*" -delete
[testenv:static]
description = Code formatting and static analysis
skip_install = true
deps = -r requirements/static.txt
allowlist_externals = sh
# The first run of pre-commit may reformat files. If this happens, it returns 1 but this
# should not fail the job. So just run again if it fails. A second failure means that
# either the different formatters can't agree on a format or that static analysis failed.
commands = sh -c 'pre-commit run -a || (echo "" && pre-commit run -a)'