forked from probabilistic-numerics/probnum
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
76 lines (68 loc) · 3.2 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
72
73
74
75
76
# 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, benchmarks, black, isort, pylint
[testenv]
# Test dependencies are listed in setup.cfg under [options.extras_require]
usedevelop = True
extras = test_deps
commands =
pytest --doctest-modules --cov=probnum --no-cov-on-fail --cov-report=xml --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
whitelist_externals = make
commands =
make clean
make html
[testenv:black]
description = Code linting with Black
basepython = python3
deps = black == 20.8b0
commands = black --check --diff .
[testenv:isort]
description = Sorting imports with isort
basepython = python3
deps = isort == 5.5.4
commands = isort --profile black --check --diff .
[testenv:format]
description = Code formatting with Black and isort (and possibly other tools in the future)
basepython = python3
deps =
{[testenv:black]deps}
{[testenv:isort]deps}
commands =
black .
isort --profile black .
[testenv:benchmarks]
description = Dry run the benchmarks to check for errors
basepython = python3
deps = git+https://github.com/airspeed-velocity/asv.git@a131ca742daf53c4521fbfefeb53507b5c140c84#egg=asv
changedir = benchmarks
commands =
asv machine --yes
asv run -e --quick --dry-run --strict --show-stderr --python=same
[testenv:pylint]
basepython = python3
description = Code linting with pylint
deps = pylint == 2.6
ignore_errors = true
commands =
# pylint src --jobs=0
pylint src/probnum/diffeq --jobs=0
pylint src/probnum/filtsmooth --jobs=0
pylint src/probnum/kernels --disable="too-few-public-methods,invalid-name" --jobs=0
pylint src/probnum/linalg --disable="attribute-defined-outside-init,too-many-statements,too-many-instance-attributes,too-complex,protected-access,too-many-lines,no-self-use,too-many-locals,redefined-builtin,arguments-differ,abstract-method,too-many-arguments,too-many-branches,duplicate-code,unused-argument,fixme,missing-module-docstring" --jobs=0
pylint src/probnum/linops --jobs=0
pylint src/probnum/quad --disable="too-few-public-methods" --jobs=0
pylint src/probnum/random_variables --disable="missing-function-docstring" --jobs=0
pylint src/probnum/problems --jobs=0
pylint src/probnum/utils --jobs=0
pylint benchmarks --disable="unused-argument,missing-function-docstring,attribute-defined-outside-init" --jobs=0 # not a work in progress, but final
pylint tests --disable="line-too-long,duplicate-code,missing-class-docstring,unnecessary-pass,unused-variable,protected-access,attribute-defined-outside-init,no-self-use,abstract-class-instantiated,too-many-arguments,too-many-instance-attributes,too-many-locals,unused-argument,fixme,missing-module-docstring,missing-function-docstring,redefined-outer-name,function-redefined,import-error" --jobs=0