forked from juaml/junifer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
150 lines (134 loc) · 2.69 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[tox]
envlist = isort, black, flake8, test, coverage, codespell, py3{8,9,10}
isolated_build = true
[gh-actions]
python =
3.8: py38
3.9: coverage
3.10: py310
[testenv]
skip_install = false
# Required for git-annex
passenv =
HOME
deps =
pytest
commands =
pytest
[testenv:isort]
skip_install = true
deps =
isort
commands =
isort --check-only --diff {toxinidir}/junifer {toxinidir}/setup.py
[testenv:black]
skip_install = true
deps =
black
commands =
black --check --diff {toxinidir}/junifer {toxinidir}/setup.py
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-docstrings
flake8-bugbear
commands =
flake8 {toxinidir}/junifer {toxinidir}/setup.py
[testenv:test]
skip_install = false
passenv =
HOME
deps =
pytest
commands =
pytest -vv
[testenv:coverage]
skip_install = false
deps =
pytest
pytest-cov
commands =
pytest --cov={envsitepackagesdir}/junifer --cov-report=xml -vv --cov-report=term
[testenv:codespell]
skip_install = true
deps =
codespell
commands =
codespell --config tox.ini examples/ junifer/ scratch/ tools/
################
# Tool configs #
################
[isort]
skip =
__init__.py
profile = black
line_length = 79
lines_after_imports = 2
known_first_party = junifer
known_third_party =
click
numpy
datalad
pandas
nibabel
nilearn
sqlalchemy
yaml
pytest
[flake8]
exclude =
__init__.py
max-line-length = 79
extend-ignore =
B024 # abstract class with no abstract methods
D202
E201 # whitespace after ‘(’
E202 # whitespace before ‘)’
E203 # whitespace before ‘,’, ‘;’, or ‘:’
E221 # multiple spaces before operator
E222 # multiple spaces after operator
E241 # multiple spaces after ‘,’
I100
I101
I201
N806
W503 # line break before binary operator
W504 # line break after binary operator
[pytest]
testpaths =
junifer/api/tests
junifer/configs/tests
junifer/data/tests
junifer/datagrabber/tests
junifer/datareader/tests
junifer/markers/tests
junifer/preprocess/tests
junifer/storage/tests
junifer/testing
junifer/utils/tests
[coverage:paths]
source =
junifer
*/site-packages/junifer
[coverage:run]
branch = true
omit =
*/setup.py
*/_version.py
*/tests/*
parallel = false
[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain if non-runnable code isn't run:
if __name__ == .__main__.:
precision = 2
[codespell]
skip = docs/auto_*,*.html,.git/,*.pyc,docs/_build
count =
quiet-level = 3
ignore-words = ignore_words.txt
interactive = 0
builtin = clear,rare,informal,names,usage