forked from probabilistic-numerics/probnum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
83 lines (75 loc) · 6.03 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
77
78
79
80
81
82
83
# 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]
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
whitelist_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:benchmarks]
description = Dry run the benchmarks to check for errors
basepython = python3
deps = -r{toxinidir}/benchmarks/requirements.txt
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 =
-r{toxinidir}/tests/requirements.txt
-r{toxinidir}/linting-requirements.txt
ignore_errors = true
commands =
# Global Linting Pass
pylint src/probnum --disable="no-member,abstract-method,arguments-differ,arguments-renamed,redefined-builtin,redefined-outer-name,too-many-instance-attributes,too-many-arguments,too-many-locals,too-many-lines,too-many-statements,too-many-branches,too-complex,too-few-public-methods,protected-access,unnecessary-pass,unused-variable,unused-argument,attribute-defined-outside-init,no-else-return,no-else-raise,no-self-use,else-if-used,consider-using-from-import,duplicate-code,missing-module-docstring,missing-class-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,useless-param-doc,useless-type-doc,missing-return-type-doc" --jobs=0
# Per-package Linting Passes
pylint src/probnum/diffeq --disable="redefined-outer-name,too-many-instance-attributes,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unnecessary-pass,unused-variable,unused-argument,no-self-use,duplicate-code,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc" --jobs=0
pylint src/probnum/filtsmooth --disable="no-member,arguments-differ,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unused-variable,unused-argument,no-self-use,duplicate-code,useless-param-doc" --jobs=0
pylint src/probnum/linalg --disable="no-member,abstract-method,arguments-differ,else-if-used,redefined-builtin,too-many-instance-attributes,too-many-arguments,too-many-locals,too-many-lines,too-many-statements,too-many-branches,too-complex,too-few-public-methods,protected-access,unused-argument,attribute-defined-outside-init,no-else-return,no-else-raise,no-self-use,duplicate-code,missing-module-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc" --jobs=0
pylint src/probnum/linops --disable="too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,no-else-return,no-else-raise,else-if-used,missing-class-docstring,missing-function-docstring,missing-raises-doc,duplicate-code" --jobs=0
pylint src/probnum/problems --disable="too-many-arguments,too-many-locals,unused-variable,unused-argument,consider-using-from-import,duplicate-code,missing-module-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc" --jobs=0
pylint src/probnum/quad --disable="too-many-arguments,missing-module-docstring" --jobs=0
pylint src/probnum/randprocs --disable="arguments-differ,arguments-renamed,too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,unused-argument,no-else-return,duplicate-code,missing-module-docstring,missing-class-docstring,missing-function-docstring,missing-type-doc,missing-raises-doc,useless-param-doc,useless-type-doc,missing-return-type-doc" --jobs=0
pylint src/probnum/randprocs/kernels --disable="duplicate-code" --jobs=0
pylint src/probnum/randvars --disable="too-many-arguments,too-many-locals,too-many-branches,too-few-public-methods,protected-access,unused-argument,duplicate-code,missing-function-docstring,missing-raises-doc" --jobs=0
pylint src/probnum/utils --disable="missing-raises-doc,missing-return-type-doc" --jobs=0
# Benchmark and Test Code Linting Pass
# pylint benchmarks --disable="unused-argument,attribute-defined-outside-init,missing-function-docstring" --jobs=0 # not a work in progress, but final
pylint benchmarks --disable="unused-argument,attribute-defined-outside-init,no-else-return,no-self-use,consider-using-from-import,missing-module-docstring,missing-class-docstring,missing-function-docstring" --jobs=0
# pylint tests --disable="missing-function-docstring" --jobs=0 # not a work in progress, but final
pylint tests --disable="arguments-differ,redefined-outer-name,too-many-instance-attributes,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unnecessary-pass,unused-variable,unused-argument,unused-private-member,attribute-defined-outside-init,no-else-return,no-self-use,consider-using-from-import,duplicate-code,missing-module-docstring,missing-class-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc,redundant-returns-doc" --jobs=0