forked from probabilistic-numerics/probnum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
66 lines (56 loc) · 2.98 KB
/
Copy pathtox.ini
File metadata and controls
66 lines (56 loc) · 2.98 KB
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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# 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, pylint
[testenv]
deps =
pytest >= 4.6
pytest-cov
commands =
pytest --doctest-modules --cov=probnum --no-cov-on-fail --cov-report=xml
[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:format]
description = Code formatting with Black (and possibly other tools in the future)
basepython = python3
deps = {[testenv:black]deps}
commands = 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
pylint src/probnum/diffeq --disable="protected-access,abstract-class-instantiated,too-many-locals,too-few-public-methods,too-many-arguments,unused-argument,missing-module-docstring,missing-function-docstring"
pylint src/probnum/filtsmooth --disable="duplicate-code,no-self-use,too-many-locals,too-many-arguments,unused-argument,missing-module-docstring,missing-function-docstring"
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"
pylint src/probnum/quad --disable="attribute-defined-outside-init,too-few-public-methods,redefined-builtin,arguments-differ,unused-argument,missing-module-docstring"
pylint src/probnum/random_variables --disable="missing-function-docstring"
pylint src/probnum/utils --disable="duplicate-code,missing-module-docstring,missing-function-docstring"
pylint benchmarks --disable="missing-function-docstring" # 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"