forked from BlueBrain/EModelRunner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
112 lines (98 loc) · 2.61 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
106
107
108
109
110
111
112
[base]
name = emodelrunner
testdeps =
NEURON
cmake
mock
pytest
[tox]
envlist =
check-packaging
lint
py3-{unit,sscx,synplas}
docs
minversion = 3.7
# ignore basepython for envs that already specify a version
ignore_basepython_conflict = true
[gh-actions]
python =
3.7: py3
3.8: check-packaging, lint, docs, py3
3.9: py3
[testenv]
basepython=python
envdir =
py3{-unit,-sscx,-synplas}: {toxworkdir}/py3
py37{-unit,-sscx,-synplas}: {toxworkdir}/py37
py38{-unit,-sscx,-synplas}: {toxworkdir}/py38
py39{-unit,-sscx,-synplas}: {toxworkdir}/py39
deps =
{[base]testdeps}
pathlib
coverage
pytest-cov
passenv = KRB5CCNAME DISPLAY https_proxy USER
whitelist_externals = make
coverage_options = --cov-append --cov-report=xml --cov-config=.coveragerc
commands =
make clean
make remove_test_output
unit: pytest -sx --cov=emodelrunner {[testenv]coverage_options} tests/unit_tests
sscx: ./.compile_mod.sh examples/sscx_sample_dir mechanisms
sscx: pytest -sx --cov=emodelrunner {[testenv]coverage_options} tests/sscx_tests
synplas: ./.compile_mod.sh examples/synplas_sample_dir mechanisms
synplas: pytest -sx --cov=emodelrunner {[testenv]coverage_options} tests/test_synplas.py
[testenv:check-packaging]
envdir={toxworkdir}/{envname}
deps =
wheel
twine
commands =
python setup.py sdist bdist_wheel -d {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:lint]
envdir={toxworkdir}/{envname}
deps =
pycodestyle
pydocstyle
pylint
black
download = true
commands =
pycodestyle {[base]name}
pydocstyle {[base]name}
# super-with-arguments and useless-object-inheritance are for py27 compatibility
pylint --disable=useless-object-inheritance,super-with-arguments {[base]name}
black --check {[base]name}
black --check tests
black --check setup.py
[testenv:format]
envdir={toxworkdir}/{envname}
deps = black
commands =
black {[base]name}
black tests
black setup.py
[testenv:docs]
envdir={toxworkdir}/{envname}
changedir = doc
deps =
sphinx
sphinx-bluebrain-theme
importlib-metadata
# set warnings as errors using the -W sphinx option
commands = make html SPHINXOPTS=-W
whitelist_externals = make
# E731: do not assign a lambda expression, use a def
# W503: line break after binary operator
# W504: line break before binary operator
# E402: module level import not at top of file
# E203: whitespace before ':'
[pycodestyle]
ignore = E731,W503,W504,E402,E203
max-line-length = 100
[pydocstyle]
# ignore the following
# - D413: no blank line afer last section
add-ignore = D413
convention = google