-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
71 lines (62 loc) · 2.23 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[tox]
envlist = py310
isolated_build = true
[testenv]
deps = -r requirements/test.txt
setenv =
JUPYTER_PLATFORM_DIRS = 1
commands = pytest {posargs}
[testenv:nightly]
deps = -r requirements/nightly.txt
commands = pytest {posargs}
[testenv:unpinned]
description = Test with unpinned dependencies, as a user would install now.
deps =
-r requirements/basetest.txt
essdiffraction
commands = pytest {posargs}
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
# setuptools is required by sphinxcontrib-bibtex but not allowed in
# requirements files. So we install it explicitly here.
deps =
setuptools
-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:releasedocs]
description = invoke sphinx-build to build the HTML docs from a released version
skip_install = true
deps =
essdiffraction=={posargs}
{[testenv:docs]deps}
allowlist_externals={[testenv:docs]allowlist_externals}
commands = {[testenv:docs]commands}
[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
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)'
[testenv:mypy]
description = Type checking (mypy)
deps = -r requirements/mypy.txt
commands = python -m mypy .
[testenv:deps]
description = Update dependencies by running pip-compile-multi
deps =
pip-compile-multi
tomli
skip_install = true
changedir = requirements
commands = python ./make_base.py --nightly scipp,scippnexus,sciline,plopp,scippneutron,essreduce
pip-compile-multi -d . --backtracking