-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
57 lines (50 loc) · 1.6 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
# tox (https://tox.readthedocs.io/) is a tool for running tests and other continuous
# integration tools in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py3, docs, black, isort, pylint
[testenv]
usedevelop = True
# extras = full
deps = -r{toxinidir}/tests/requirements.txt
commands =
pytest {posargs:--cov=probnum --no-cov-on-fail --cov-report=xml} --doctest-modules --color=yes
[testenv:docs]
description = Invoke sphinx-build to build the HTML docs
basepython = python3
passenv = HOME
deps = -r{toxinidir}/docs/requirements.txt
changedir = docs
allowlist_externals = make
commands =
make clean
make html
[testenv:format]
description = Code formatting with Black and isort (and possibly other tools in the future)
basepython = python3
deps = -r{toxinidir}/formatting-requirements.txt
commands =
black .
isort --profile black .
[testenv:black]
description = Check code formatting with Black
envdir = {toxworkdir}/format
basepython = {[testenv:format]basepython}
deps = {[testenv:format]deps}
commands = black --check --diff .
[testenv:isort]
description = Check import sorting with isort
envdir = {toxworkdir}/format
basepython = {[testenv:format]basepython}
deps = {[testenv:format]deps}
commands = isort --profile black --check --diff .
[testenv:pylint]
basepython = python3
description = Code linting with pylint
deps =
-r{toxinidir}/tests/requirements.txt
-r{toxinidir}/linting-requirements.txt
ignore_errors = true
commands =
pylint src --jobs=0