Debian Codegraph @

tox.ini

raw
1 [tox]
2 basepython = python3.13
3 envlist =
4 py{310,311,312,313,314,py310}-{low,release,appinstall}
5 mypy
6 async
7 nowebauthn
8 nobabel
9 noauthlib
10 style
11 docs
12 coverage
13 makedist
14 skip_missing_interpreters = false
15
16 [testenv]
17 allowlist_externals = tox
18
19 [testenv:pypy310-release]
20 deps =
21 -r requirements/tests.txt
22 commands =
23 tox -e compile_catalog
24 pytest -W ignore --basetemp={envtmpdir} {posargs:tests}
25
26 [testenv:py{310,311,312,313,314}-release]
27 deps =
28 -r requirements/tests.txt
29 commands =
30 tox -e compile_catalog
31 pytest --basetemp={envtmpdir} {posargs:tests}
32
33 [testenv:py{310,311,312,313,314,py310}-low]
34 deps =
35 pytest
36 extras = low
37 commands =
38 tox -e compile_catalog
39 pytest -W ignore --basetemp={envtmpdir} {posargs:tests}
40
41 # manual test to check how we're keeping up with Pallets latest
42 [testenv:main]
43 basepython = python3.14
44 deps =
45 -r requirements/tests.txt
46 git+https://github.com/pallets/werkzeug@main#egg=werkzeug
47 git+https://github.com/pallets/flask@main#egg=flask
48 git+https://github.com/pallets/flask-sqlalchemy@main#egg=flask-sqlalchemy
49 git+https://github.com/pallets/jinja@main#egg=jinja2
50 git+https://github.com/pallets-eco/flask-principal@main#egg=flask-principal
51 git+https://github.com/wtforms/wtforms@main#egg=wtforms
52 git+https://github.com/maxcountryman/flask-login@main#egg=flask-login
53 commands =
54 tox -e compile_catalog
55 pytest --basetemp={envtmpdir} {posargs:tests}
56
57 [testenv:async]
58 deps =
59 -r requirements/tests.txt
60 commands =
61 pip install flask[async]
62 tox -e compile_catalog
63 pytest --basetemp={envtmpdir} {posargs:tests}
64
65 [testenv:nowebauthn]
66 deps =
67 -r requirements/tests.txt
68 commands =
69 pip uninstall -y webauthn
70 tox -e compile_catalog
71 pytest --basetemp={envtmpdir} {posargs:tests}
72
73 [testenv:nobabel]
74 deps =
75 -r requirements/tests.txt
76 commands =
77 pip uninstall -y babel flask_babel
78 pytest --basetemp={envtmpdir} {posargs:tests}
79
80 [testenv:noauthlib]
81 deps =
82 -r requirements/tests.txt
83 commands =
84 pip uninstall -y authlib
85 tox -e compile_catalog
86 pytest --basetemp={envtmpdir} {posargs:tests}
87
88 [testenv:noflasksqlalchemy]
89 deps =
90 -r requirements/tests.txt
91 commands =
92 pip uninstall -y flask_sqlalchemy flask_sqlalchemy_lite
93 tox -e compile_catalog
94 pytest --basetemp={envtmpdir} {posargs:tests}
95
96 [testenv:style]
97 deps = pre-commit
98 skip_install = true
99 commands =
100 pre-commit autoupdate
101 pre-commit run --all-files --show-diff-on-failure
102
103 [testenv:docs]
104 deps = -r requirements/docs.txt
105 commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
106
107
108 [testenv:coverage]
109 deps =
110 -r requirements/tests.txt
111 commands =
112 tox -e compile_catalog
113 coverage run --source=flask_security -m pytest
114 coverage xml
115
116 [testenv:realpostgres]
117 deps =
118 -r requirements/tests.txt
119 psycopg2-binary
120 commands =
121 # Requires that --realdburl be set otherwise doesn't actually use DB
122 tox -e compile_catalog
123 pytest --basetemp={envtmpdir} {posargs}
124
125 [testenv:makedist]
126 deps =
127 -r requirements/tests.txt
128 flit
129 twine
130 check-wheel-contents
131 commands =
132 tox -e compile_catalog
133 flit build --no-use-vcs
134 check-wheel-contents dist
135
136 [testenv:makedist-too]
137 deps =
138 -r requirements/tests.txt
139 flit
140 twine
141 check-wheel-contents
142 commands =
143 tox -e compile_catalog
144 flit -f pyproject-too.toml build --no-use-vcs
145 check-wheel-contents dist
146
147 [testenv:mypy]
148 deps =
149 -r requirements/tests.txt
150 mypy
151 commands =
152 mypy --install-types --non-interactive flask_security tests
153
154
155 [testenv:py{310,311,312,313,314}-appinstall]
156 commands = python -c "from flask_security import Security; s = Security()"
157
158 [testenv:compile_catalog]
159 deps = babel
160 skip_install = true
161 commands =
162 pybabel compile --domain flask_security -d flask_security/translations
163
164 [testenv:extract_messages]
165 deps =
166 babel
167 jinja2
168 skip_install = true
169 commands =
170 pybabel extract --version 5.8.2 --keyword=_fsdomain --project=Flask-Security \
171 -o flask_security/translations/flask_security.pot \
172 [email protected] --mapping-file=babel.ini \
173 --add-comments=NOTE flask_security
174
175 [testenv:update_catalog]
176 deps = babel
177 skip_install = true
178 commands =
179 pybabel update --domain flask_security -i flask_security/translations/flask_security.pot \
180 -d flask_security/translations --no-fuzzy-matching
181 [flake8]
182 max-line-length = 88
183 per-file-ignores =
184 tests/view_scaffold.py: E402