forked from IFCA-Advanced-Computing/caso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
162 lines (142 loc) · 3.13 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
[tox]
minversion = 4.3.3
envlist =
py{37,38,39,310}
flake8
pip-missing-reqs
bandit
black
pypi
mypy
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310, flake8, pip-missing-reqs, bandit, pypi
[base]
python = python3.10
skip_install = true
package = caso
[testenv]
use_develop = true
skip_install = false
basepython = python3
allowlist_externals =
find
rm
mkdir
setenv =
VIRTUAL_ENV={envdir}
LC_ALL=en_US.utf-8
deps =
-r{toxinidir}/requirements.txt
pytest>=7.1.2
pytest-cov>=4.0.0
fixtures>=1.3.1
mock>=1.2
testtools>=1.4.0
reno>=4.0.0
commands =
find . -type f -name "*.pyc" -delete
pytest {posargs}
[testenv:venv]
commands = {posargs}
[testenv:py37]
basepython = python3.7
[testenv:py38]
basepython = python3.8
[testenv:py39]
basepython = python3.9
[testenv:py310]
basepython = python3.10
[testenv:cov]
basepython = python3.10
commands =
find . -type f -name "*.pyc" -delete
pytest {posargs} --cov={[base]package} \
--cov-report term \
--cov-report=xml
[testenv:covhtml]
basepython = python3.10
commands =
find . -type f -name "*.pyc" -delete
pytest {posargs} --cov={[base]package} \
--cov-report term \
--cov-report=html
[flake8]
# Black default line length is 88
max-line-length = 88
show-source = True
builtins = _
ignore = E123,E125,H803,H405,W504
exclude =
.venv
.git
.tox
dist
doc
*lib/python*
*egg
build
[testenv:flake8]
basepython = {[base]python}
skip_install = {[base]skip_install}
deps =
flake8>=4.0,<4.1
flake8-bugbear>=22.3,<22.4
flake8-docstrings>=1.6,<1.7
flake8-typing-imports>=1.12,<1.13
flake8-colors>=0.1,<0.2
pep8-naming>=0.12,<0.13
pydocstyle>=6.1,<6.2
commands =
flake8 {[base]package}
[testenv:black]
basepython = {[base]python}
skip_install = {[base]skip_install}
deps =
black>=22.3,<22.4
commands = black --check --diff {[base]package}
[testenv:bandit]
basepython = {[base]python}
skip_install = {[base]skip_install}
deps =
bandit>=1.7.5
commands = bandit -r {[base]package} -x tests -s B110,B410
[testenv:bandit-report]
basepython = {[base]python}
skip_install = {[base]skip_install}
deps =
{[testenv:bandit]deps}
commands =
- mkdir /tmp/bandit
- bandit -r {[base]package} -x tests -s B110,B410 -f html -o /tmp/bandit/index.html
[testenv:pypi]
basepython = {[base]python}
skip_install = {[base]skip_install}
deps =
docutils>=0.18.1
Pygments>=2.14.0
commands = python3 setup.py check -r -s -m
[testenv:mypy]
description = Static type checks
basepython = {[base]python}
deps =
mypy>=0.761 # MIT
types-six>=1.16.21.7
types-python-dateutil>=2.8.19.11
commands =
mypy --config-file mypy.ini -p {[base]package}
[testenv:pip-missing-reqs]
basepython = {[base]python}
deps = pip_check_reqs>=2.4.4
commands=pip-missing-reqs -d --ignore-file={[base]package}/tests/* {[base]package}
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/caso/caso-config-generator.conf
[testenv:docs]
deps =
-rdoc/requirements.txt
commands =
rm -rf doc/build
python setup.py build_sphinx