[tox] basepython = python3.13 envlist = py{311,312,313,314,py311}-{low,release,appinstall} mypy async nowebauthn nobabel noauthlib style docs coverage makedist skip_missing_interpreters = false [testenv] allowlist_externals = tox [testenv:pypy311-release] dependency_groups = tests commands = tox -e compile_catalog pytest -W ignore --basetemp={envtmpdir} {posargs:tests} [testenv:py{311,312,313,314}-release] dependency_groups = tests commands = tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:py{311,312,313,314,py311}-low] deps = pytest dependency_groups = 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:main] basepython = python3.14 dependency_groups = tests deps = 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@main#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] dependency_groups = tests commands = pip install flask[async] tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:nowebauthn] dependency_groups = tests commands = pip uninstall -y webauthn tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:nobabel] dependency_groups = tests commands = pip uninstall -y babel flask_babel pytest --basetemp={envtmpdir} {posargs:tests} [testenv:noauthlib] dependency_groups = tests commands = pip uninstall -y authlib tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:noflasksqlalchemy] dependency_groups = tests 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 run --all-files --show-diff-on-failure [testenv:docs] dependency_groups = docs commands = sphinx-build -E -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html [testenv:update-actions] description = Update GitHub Action Pins labels = update deps = gha-update; python_full_version >= '3.12' skip_install = true commands = gha-update [testenv:update-pre_commit] description = Update pre-commit Pins labels = update deps = pre-commit skip_install = true commands = pre-commit autoupdate --freeze -j4 [testenv:coverage] dependency_groups = tests commands = tox -e compile_catalog coverage run --source=flask_security -m pytest coverage xml [testenv:realpostgres] dependency_groups = tests deps = psycopg2-binary commands = # Requires that --realdburl be set otherwise doesn't actually use DB tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs} [testenv:makedist] dependency_groups = tests deps = flit twine check-wheel-contents commands = tox -e compile_catalog flit build --no-use-vcs check-wheel-contents dist [testenv:makedist-too] dependency_groups = tests deps = 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] dependency_groups = tests typing commands = mypy --install-types --non-interactive flask_security tests # basedpyright --verifytypes flask_security --ignoreexternal [testenv:py{311,312,313,314}-appinstall] commands = python -c "from flask_security import Security; s = Security()" [testenv:compile_catalog] deps = babel skip_install = true commands = pybabel compile --domain flask_security -d flask_security/translations pybabel compile --domain flask_security -d tests/translations [testenv:extract_messages] deps = babel jinja2 skip_install = true commands = pybabel extract --version 5.9.1 --keyword=_fsdomain --project=Flask-Security \ -o flask_security/translations/flask_security.pot \ --msgid-bugs-address=jwag956@github.com --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 pybabel update --domain flask_security -l cic_US -i flask_security/translations/flask_security.pot \ -d tests/translations --no-fuzzy-matching [flake8] max-line-length = 88 per-file-ignores = tests/view_scaffold.py: E402