-
Notifications
You must be signed in to change notification settings - Fork 155
/
tox.ini
180 lines (159 loc) · 4.27 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
[tox]
basepython = python3.11
envlist =
py{39,310,311,312,py39}-{low,release}
mypy
async
nowebauthn
nobabel
noauthlib
style
docs
coverage
makedist
skip_missing_interpreters = false
[testenv]
allowlist_externals = tox
[testenv:pypy39-release]
deps =
-r requirements/tests.txt
commands =
tox -e compile_catalog
pytest -W ignore --basetemp={envtmpdir} {posargs:tests}
[testenv:py{39,310,311,312}-release]
deps =
-r requirements/tests.txt
commands =
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:py{39,310,311,312,py39}-low]
deps =
pytest
extras = low
commands =
tox -e compile_catalog
pytest -W ignore --basetemp={envtmpdir} {posargs:tests}
# manual test to check how we're keeping up with Pallets latest
[testenv:py311-main]
deps =
-r requirements/tests.txt
git+https://github.com/pallets/werkzeug@main#egg=werkzeug
git+https://github.com/pallets/flask@main#egg=flask
git+https://github.com/pallets/flask-sqlalchemy@main#egg=flask-sqlalchemy
git+https://github.com/pallets/jinja@main#egg=jinja2
git+https://github.com/pallets-eco/flask-principal@main#egg=flask-principal
git+https://github.com/wtforms/wtforms@master#egg=wtforms
git+https://github.com/maxcountryman/flask-login@main#egg=flask-login
commands =
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:async]
deps =
-r requirements/tests.txt
commands =
pip install flask[async]
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:nowebauthn]
deps =
-r requirements/tests.txt
commands =
pip uninstall -y webauthn
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:nobabel]
deps =
-r requirements/tests.txt
commands =
pip uninstall -y babel flask_babel
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:noauthlib]
deps =
-r requirements/tests.txt
commands =
pip uninstall -y authlib
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:noflasksqlalchemy]
deps =
-r requirements/tests.txt
commands =
pip uninstall -y flask_sqlalchemy flask_sqlalchemy_lite
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:style]
deps = pre-commit
skip_install = true
commands =
pre-commit autoupdate
pre-commit run --all-files --show-diff-on-failure
[testenv:docs]
deps = -r requirements/docs.txt
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
[testenv:coverage]
deps =
-r requirements/tests.txt
commands =
tox -e compile_catalog
coverage run --source=flask_security -m pytest
coverage xml
[testenv:realpostgres]
deps =
-r requirements/tests.txt
psycopg2
commands =
# Requires that --realdburl be set otherwise doesn't actually use DB
tox -e compile_catalog
pytest --basetemp={envtmpdir} {posargs}
[testenv:makedist]
deps =
-r requirements/tests.txt
flit
twine
check-wheel-contents
commands =
tox -e compile_catalog
flit build --no-use-vcs
check-wheel-contents dist
[testenv:makedist-too]
deps =
-r requirements/tests.txt
flit
twine
check-wheel-contents
commands =
tox -e compile_catalog
flit -f pyproject-too.toml build --no-use-vcs
check-wheel-contents dist
[testenv:mypy]
deps =
-r requirements/tests.txt
types-setuptools
mypy
commands =
mypy --install-types --non-interactive flask_security tests
[testenv:compile_catalog]
deps = babel
skip_install = true
commands =
pybabel compile --domain flask_security -d flask_security/translations
[testenv:extract_messages]
deps =
babel
jinja2
skip_install = true
commands =
pybabel extract --version 5.5.2 --keyword=_fsdomain --project=Flask-Security \
-o flask_security/translations/flask_security.pot \
[email protected] --mapping-file=babel.ini \
--add-comments=NOTE flask_security
[testenv:update_catalog]
deps = babel
skip_install = true
commands =
pybabel update --domain flask_security -i flask_security/translations/flask_security.pot \
-d flask_security/translations --no-fuzzy-matching
[flake8]
max-line-length = 88
per-file-ignores =
tests/view_scaffold.py: E402