* Update .gitignore * Simplify packaging, move mypy config to pyproject.toml * Reflow Tidelift spiel * Freshen up contribution guide * Update CI * Modernize tox & CI * 3.11 * Don't pass args to build in CI * oops * Add wheel/dist inspection * Simplify conf.py * fix * simplify * Clarify license * cleanup * docs * add missing _ * parallel output sucks
132 lines
3.1 KiB
INI
132 lines
3.1 KiB
INI
[flake8]
|
|
exclude = src/argon2/_ffi.py
|
|
ignore =
|
|
# Ambiguous variable names
|
|
# Ignored, since there is an enum value "I" for the algorithm type Argon2I
|
|
E741
|
|
# Not an actual PEP8 violation
|
|
W503
|
|
# Black vs flake8 conflict
|
|
E203
|
|
|
|
|
|
# Keep docs in sync with docs env and .readthedocs.yml.
|
|
# We don't run pre-commit in CI, because we use pre-commit.ci.
|
|
[gh-actions]
|
|
python =
|
|
3.6: py36
|
|
3.7: py37
|
|
3.8: py38, docs
|
|
3.9: py39, mypy
|
|
3.10: py310, bindings-main
|
|
3.11: py311
|
|
pypy-3: pypy3
|
|
|
|
|
|
[tox]
|
|
envlist = pre-commit,mypy,py36,py37,py38,py39,py310,py311,pypy3,system-argon2,bindings-main,docs,pypi-description,coverage-report
|
|
isolated_build = true
|
|
|
|
|
|
[testenv:docs]
|
|
description = Build docs and run doctests.
|
|
# Keep basepython in sync with gh-actions and .readthedocs.yml.
|
|
basepython = python3.8
|
|
extras = docs
|
|
commands =
|
|
python -m doctest README.rst
|
|
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
|
|
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
|
|
|
|
|
|
[testenv:pre-commit]
|
|
description = Run all pre-commit hooks.
|
|
skip_install = true
|
|
deps = pre-commit
|
|
passenv = HOMEPATH # needed on Windows
|
|
commands = pre-commit run --all-files
|
|
|
|
|
|
[testenv:mypy]
|
|
description = Check types
|
|
basepython = python3.9
|
|
extras = tests
|
|
deps = mypy
|
|
commands = mypy src typing_examples.py
|
|
|
|
|
|
[testenv:py37]
|
|
description = Run tests and measure coverage.
|
|
extras = tests
|
|
deps = coverage[toml]
|
|
commands =
|
|
coverage run -m pytest {posargs}
|
|
coverage run -m argon2 -n 1 -t 1 -m 8 -p 1
|
|
coverage run -m argon2 --profile CHEAPEST
|
|
|
|
|
|
[testenv:py310]
|
|
description = Run tests and measure coverage.
|
|
extras = tests
|
|
deps = coverage[toml]
|
|
commands =
|
|
coverage run -m pytest {posargs}
|
|
coverage run -m argon2 -n 1 -t 1 -m 8 -p 1
|
|
coverage run -m argon2 --profile CHEAPEST
|
|
|
|
|
|
[testenv:coverage-report]
|
|
description = Report coverage over all test runs.
|
|
depends =
|
|
py37
|
|
py310
|
|
basepython = python3.10
|
|
deps = coverage[toml]
|
|
skip_install = true
|
|
commands =
|
|
coverage combine
|
|
coverage report
|
|
|
|
|
|
[testenv]
|
|
description = Run tests and do NOT measure coverage.
|
|
extras = tests
|
|
commands =
|
|
python -m pytest {posargs}
|
|
python -m argon2 -n 1 -t 1 -m 8 -p 1
|
|
|
|
|
|
[testenv:system-argon2]
|
|
description = Run tests against bindings that use a system installation of Argon2.
|
|
basepython = python3.8
|
|
setenv = ARGON2_CFFI_USE_SYSTEM=1
|
|
extras = tests
|
|
install_command =
|
|
pip install {opts} --no-binary=argon2-cffi-bindings {packages}
|
|
commands =
|
|
python -m pytest {posargs}
|
|
python -m argon2 -n 1 -t 1 -m 8 -p 1
|
|
|
|
|
|
[testenv:bindings-main]
|
|
description = Run tests against the current main branch of argon2-cffi-bindings
|
|
basepython = python3.10
|
|
extras = tests
|
|
install_command =
|
|
pip install {opts} --no-deps {packages}
|
|
commands =
|
|
pip install hypothesis pytest git+https://github.com/hynek/argon2-cffi-bindings
|
|
python -m pytest {posargs}
|
|
python -m argon2 -n 1 -t 1 -m 8 -p 1
|
|
|
|
|
|
[testenv:pypi-description]
|
|
description = Ensure README.rst renders on PyPI.
|
|
skip_install = true
|
|
deps =
|
|
twine
|
|
pip >= 18.0.0
|
|
commands =
|
|
pip wheel -w {envtmpdir}/build --no-deps .
|
|
twine check {envtmpdir}/build/*
|