-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
176 lines (156 loc) · 3.18 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
minversion = 3.15
envlist = black, pep8, pep257, pylint, bandit, py3{7,8,9,10,11,12},pypy3{7,8,9,10,11,12}
skip_missing_interpreters = True
[testenv]
recreate = True
usedevelop = True
passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
setev = PYTHONDONTWRITEBYTECODE=1
deps =
sphinx
-r{toxinidir}/pytest_requirements.txt
pytest-html
-r{toxinidir}/CI_REQUIREMENTS.txt
commands =
pip freeze
py.test --cov-report html --self-contained-html --html=report.html --cov=sqlalchemy_jsonfield
coverage report --fail-under 90 # No 100% due to deps magic
[testenv:venv]
commands = {posargs:}
[testenv:functional]
deps =
sphinx
pytest
pytest-cov
coverage[toml]>=5.0
pytest-html
pytest-sugar
PyMySQL
psycopg2
sqlalchemy
commands =
py.test {posargs:functional_test}
[testenv:ruff]
skip_install = true
depends = black,isort
deps = ruff
commands = ruff check .
[testenv:refurb]
skip_install = true
depends = black,isort
deps = refurb
commands = refurb sqlalchemy_jsonfield
[testenv:pep8]
skip_install = true
depends = black,isort
deps =
-r{toxinidir}/flake8_requirements.txt
commands = flake8 sqlalchemy_jsonfield
[testenv:pep257]
skip_install = true
depends = black,isort
deps =
pydocstyle[toml]
commands = pydocstyle -v sqlalchemy_jsonfield
[testenv:doc8]
skip_install = true
deps =
doc8
Pygments
commands = doc8 README.rst doc/source
[testenv:install]
deps =
commands = pip install ./ -vvv -U
[testenv:pylint]
depends = pep8,ruff,pep257,bandit
deps =
pylint>=3.0.0
-r{toxinidir}/CI_REQUIREMENTS.txt
commands =
pylint sqlalchemy_jsonfield
[testenv:docs]
depends = doc8,readme
deps =
sphinx
commands = sphinx-build doc/source/ doc/build
[testenv:readme]
skip_install = true
deps =
twine
build
commands =
python -m build -s
twine check {toxinidir}/dist/*
[testenv:bandit]
depends = black,isort
deps =
bandit
sqlalchemy
commands = bandit -r sqlalchemy_jsonfield
[testenv:dep-graph]
deps =
.
pipdeptree
commands = pipdeptree
[testenv:black]
skip_install = true
depends = isort
deps =
black
regex
commands =
black sqlalchemy_jsonfield
[testenv:mypy]
depends = pep8,ruff,pep257,bandit
deps =
-r{toxinidir}/mypy_requirements.txt
-r{toxinidir}/CI_REQUIREMENTS.txt
commands =
mypy --install-types --non-interactive --xslt-html-report mypy_report -p sqlalchemy_jsonfield
[testenv:isort]
skip_install = true
deps =
isort
commands =
isort sqlalchemy_jsonfield
[flake8]
exclude =
.venv,
.git,
.tox,
dist,
doc,
*lib/python*,
*egg,
build,
__init__.py,
_version.py,
docs
ignore =
E203,
# whitespace before ':'
W503,
# line break before binary operator
D401,
# First line should be in imperative mood; try rephrasing
D202,
# No blank lines allowed after function docstring
D203,
# 1 blank line required before class docstring
D213
# Multi-line docstring summary should start at the second line
show-pep8 = True
show-source = True
count = True
max-line-length = 120