-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
105 lines (96 loc) · 2.17 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[base]
name = blueetl
path = src/blueetl
testdeps =
pytest
pytest-cov
coverage[toml]
voxcell
[tox]
envlist =
lint
docs
py{39,310,311,312}
minversion = 4
[testenv]
setenv =
TMPDIR={env:TMPDIR:/tmp}
SHMDIR={env:SHMDIR:{env:TMPDIR}}
# Run serially
BLUEETL_JOBLIB_JOBS=1
extras =
all
deps =
{[base]testdeps}
commands =
python -m pytest -vs --cov={[base]name} tests/unit {posargs}
coverage xml
coverage html
[testenv:functional]
setenv =
{[testenv]setenv}
BLUEETL_JOBLIB_JOBS=6
deps =
{[base]testdeps}
pytest-xdist
bluepy>=2.5.2
commands = python -m pytest -n6 -vs tests/functional {posargs}
[testenv:check-packaging]
skip_install = true
deps =
wheel
twine
build
commands_pre =
rm -Rf {envtmpdir}/dist src/{[base]name}.egg-info
commands =
python -m build --outdir {envtmpdir}/dist
twine check {envtmpdir}/dist/*
allowlist_externals = rm
[testenv:lint]
deps =
ruff
pycodestyle
pydocstyle[toml]
pylint
pylint-pydantic
isort
black[jupyter]
mypy
types-PyYAML
commands =
isort --check-only --diff {[base]path}
black --check .
ruff check {[base]path}
pycodestyle {[base]path}
pydocstyle {[base]path}
pylint {[base]path}
mypy --show-error-codes --ignore-missing-imports --allow-redefinition {[base]path}
[testenv:format]
deps =
pyupgrade
autoflake
isort
black[jupyter]
commands =
find {[base]path} -type f -name '*.py' -exec pyupgrade --py39-plus {} ;
autoflake -ir --remove-all-unused-imports --ignore-init-module-imports {[base]path}
isort {[base]path}
black .
allowlist_externals = find
[testenv:docs]
changedir = doc
extras =
all
docs
# set warnings as errors using the -W sphinx option
# if the notebooks execution fails, it can be overridden: SPHINXOPTS= tox -e docs
commands = make clean html SPHINXOPTS={env:SPHINXOPTS:-W}
allowlist_externals = make
[pycodestyle]
# E203: whitespace before ':'
# E731: do not assign a lambda expression, use a def
# W503: line break after binary operator
# W504: line break before binary operator
# E501: line too long (checked with pylint)
ignore = E203,E731,W503,W504,E501