-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
92 lines (80 loc) · 1.76 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
[base]
name = morph_tool
testdeps =
mock
pytest
bluepysnap>=0.5
pandas
[pytest]
minversion = 6.0
testpaths =
tests
[tox]
envlist =
{py38,py39,py310,py311}
check-dist
lint
docs
coverage
[testenv]
extras = all
deps = {[base]testdeps}
commands = pytest --basetemp={envtmpdir} {posargs}
[testenv:check-dist]
deps = twine
commands =
rm -rf {toxinidir}/dist
python setup.py sdist bdist_wheel
twine check {toxinidir}/dist/*
allowlist_externals = rm
[testenv:lint]
deps =
{[base]testdeps}
pycodestyle
pydocstyle
pylint
commands =
pycodestyle {[base]name} --exclude tests
pydocstyle {[base]name}
pylint {[base]name} --ignore tests
[testenv:coverage]
deps =
{[base]testdeps}
coverage
commands =
coverage run --source={[base]name} -m pytest tests {posargs}
coverage report --show-missing
coverage xml
[testenv:functional]
deps = {[base]testdeps}
gitpython
tqdm
commands = pytest functional_tests {posargs}
[testenv:docs]
changedir = doc
extras = docs
# make warnings into errors with -W sphinx option
commands = make html SPHINXOPTS=-W
allowlist_externals = make
# E731: do not assign a lambda expression, use a def
# W503: line break after binary operator
# W504: line break before binary operator
[pycodestyle]
ignore = E731,W503,W504
max-line-length = 100
[flake8]
# ignore the following
# - E731: do not assign a lambda expression, use a def
# - W503: line break after binary operator
# - W504: line break before binary operator
extend-ignore = E731,W503,W504
max-line-length = 100
exclude = tests,functional_tests,doc/source,.tox,.eggs
[pydocstyle]
convention = google
[gh-actions]
python =
3.8: py38, check-dist, lint
3.9: py39, docs, coverage
3.10: py310
3.11: py311