[tox]
skipsdist=true
envlist=
    {py36,py37,py38,py39},
    lint

[testenv]
passenv = *
deps=
    -rrequirements/test-project.txt
    -rrequirements/extras.txt
    -rrequirements/test.txt
commands=
    {envbindir}/py.test --cov rummage --cov-append tests
    {envbindir}/coverage html -d {envtmpdir}/coverage
    {envbindir}/coverage xml
    {envbindir}/coverage report --show-missing

[testenv:lint]
passenv = *
deps=
    -rrequirements/lint.txt
commands=
    {envbindir}/flake8 .

[testenv:documents]
passenv = *
deps=
    -rrequirements/docs.txt
commands=
    {envpython} -m mkdocs build --clean --verbose --strict
    {envpython} -m pyspelling
    {envpython} {toxinidir}/tools/gen_docs.py --verbose --test

[flake8]
exclude=rummage/lib/gui/gui.py,site/*,tests/encodings/*,build/*,.tox/*,*tiger.py,*whirlpool.py,.eggs/*,*png.py,venv/*
max-line-length=120
ignore=D202,D203,D401,N802,N801,N803,N806,E741,W504
