-
Notifications
You must be signed in to change notification settings - Fork 9
/
tox.ini
74 lines (64 loc) · 1.59 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
[base]
name = atlas_densities
black_version = 22.0
[testenv]
extras = tests
passenv = PYTHONPATH
commands = pytest -W "ignore::DeprecationWarning:nptyping.typing_" tests {posargs}
[testenv:lint]
passenv = PYTHONPATH
deps =
mypy
black~={[base]black_version}
isort
pycodestyle
pylint
commands =
isort -l 100 --profile black --check-only --diff {[base]name} tests setup.py
black -l 100 --check {[base]name} tests setup.py
mypy --ignore-missing-imports {[base]name}
pycodestyle {[base]name}
pylint {[base]name}
[testenv:format]
passenv = PYTHONPATH
deps =
black~={[base]black_version}
isort
commands =
isort -l 100 --profile black {[base]name} tests setup.py
black -l 100 {[base]name} tests setup.py
[testenv:coverage]
passenv = PYTHONPATH
deps =
coverage
commands =
coverage run --source {[base]name} --omit '*/tests/*,*/app/*' {envbindir}/pytest
coverage report --show-missing
coverage xml
[testenv:docs]
changedir = doc
deps =
sphinx
sphinx-bluebrain-theme
sphinx-click
commands = make html SPHINXOPTS=-W
allowlist_externals = make
[testenv:check-packaging]
deps =
wheel
twine
commands =
python setup.py sdist bdist_wheel -d {envtmpdir}/dist
twine check {envtmpdir}/dist/*
# E203 whitespace before :, see
# https://github.com/psf/black/issues/315
# E731: do not assign a lambda expression, use a def
# W503: line break after binary operator
# W504: line break before binary operator
[pycodestyle]
ignore = E203,E731,W503,W504,C0330,
max-line-length = 100
[tool.black]
line-length=100
[tool.isort]
profile = "black"