forked from gdcc/pyDataverse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
196 lines (172 loc) · 4.74 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
[tox]
envlist = py36,py37,py38,coverage,coveralls,docs,packaging,dist_install
skip_missing_interpreters = True
ignore_basepython_conflict = True
[testenv]
description = default settings for unspecified tests
usedevelop = False
skip_install = False
passenv = *
basepython = python3.6
[testenv:py36]
deps =
-r{toxinidir}/requirements/tests.txt
commands =
pytest -v tests/ --cov=pyDataverse --basetemp={envtmpdir}
[testenv:py37]
basepython = python3.7
deps =
-r{toxinidir}/requirements/tests.txt
commands =
pytest -v tests/ --cov=pyDataverse --basetemp={envtmpdir}
[testenv:py38]
basepython = python3.8
deps =
-r{toxinidir}/requirements/tests.txt
commands =
pytest -v tests/ --cov=pyDataverse --basetemp={envtmpdir}
[testenv:coverage]
description = create report for coverage
deps =
-r{toxinidir}/requirements/tests.txt
commands =
pytest tests/ --cov=pyDataverse --cov-report=term-missing --cov-report=xml --cov-report=html
[testenv:coveralls]
description = create reports for coveralls
deps =
-r{toxinidir}/requirements/tests.txt
commands =
pytest tests/ --doctest-modules -v --cov=pyDataverse
[testenv:pylint]
description = pylint for linting
deps =
-r{toxinidir}/requirements/lint.txt
commands =
pylint src/pyDataverse/
pylint tests/
[testenv:mypy]
deps =
-r{toxinidir}/requirements/lint.txt
commands =
mypy src/pyDataverse/ setup.py tests/
[flake8]
max-line-length = 80
ignore = E129
exclude =
src/pyDataverse/docs/source/conf.py
.tox
.egg
[testenv:flake8]
description = flake8 for style guide and docstring testing
deps =
-r{toxinidir}/requirements/lint.txt
commands =
pip uninstall -y flake8-pytest-style
pip uninstall -y flake8-rst-docstrings
flake8 src/pyDataverse/
[testenv:flake8_docs]
description = flake8 for style guide and docstring testing
deps =
-r{toxinidir}/requirements/lint.txt
commands =
pip uninstall -y flake8-blind-except
pip uninstall -y flake8-builtins
pip uninstall -y flake8-bandit
pip uninstall -y flake8-breakpoint
pip uninstall -y flake8-bugbear
pip uninstall -y flake8-comprehensions
pip uninstall -y flake8-requirements
pip uninstall -y flake8-return
flake8 --docstring-convention numpy src/pyDataverse/
flake8 --docstring-convention numpy tests/
[testenv:flake8_tests]
description = flake8 for style guide and docstring testing
deps =
-r{toxinidir}/requirements/lint.txt
commands =
flake8 tests/
[testenv:black]
description = black for auto-formatting
deps =
-r{toxinidir}/requirements/lint.txt
commands =
black src/pyDataverse/
black tests/
[testenv:pre-commit]
deps = pre-commit
commands =
pre-commit run --all-files
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
deps =
-r{toxinidir}/requirements/docs.txt
commands =
sphinx-build -d src/pyDataverse/docs/build/docs_doctree src/pyDataverse/docs/source docs/build/html --color -b html {posargs}
[testenv:pydocstyle]
description = pydocstyle for auto-formatting
deps =
-r{toxinidir}/requirements/docs.txt
commands =
pydocstyle src/pyDataverse/
pydocstyle tests/
[testenv:packaging]
description = check packaging with twine
skip_install = True
recreate = True
deps =
-r{toxinidir}/requirements/packaging.txt
commands =
# rm -R {toxinidir}/src/pyDataverse.egg-info
# rm -R {toxinidir}/dist
# rm -R {toxinidir}/build
python setup.py sdist bdist_wheel
twine check dist/*
[testenv:dist_install]
description = install from dist
recreate = True
commands =
pip freeze
python -c "import pyDataverse; print(pyDataverse.__name__); print(pyDataverse.__version__)"
[testenv:pypitest]
description = install from test pypi
skip_install = True
recreate = True
commands =
pip install --index-url https://test.pypi.org/simple/ pyDataverse
pip freeze
python -c "import pyDataverse; print(pyDataverse.__name__); print(pyDataverse.__version__)"
[testenv:pypi]
description = install from pypi
skip_install = True
recreate = True
commands =
pip install pyDataverse
pip freeze
python -c "import pyDataverse; print(pyDataverse.__name__); print(pyDataverse.__version__)"
[testenv:radon-mc]
description = Radon McCabe number
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon cc src/pyDataverse/ -a
[testenv:radon-mi]
description = Radon Maintainability Index
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon mi src/pyDataverse/
radon mi tests/
[testenv:radon-raw]
description = Radon raw metrics
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon raw src/pyDataverse/
radon raw tests/
[testenv:radon-hal]
description = Radon Halstead metrics
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon hal src/pyDataverse/
radon hal tests/