[tox]
isolated_build = True
tox_pyenv_fallback = False
envlist = py38,py310

[testenv]
usedevelop = true
deps =
    -rrequirements.txt

[testenv:py36]
deps =
    {[testenv]deps}
commands =
    pytest -q {posargs}

[testenv:linter]
deps =
    flake8
skip_install =
    true
basepython =
    python3
commands =
    flake8 --max-line-length=120
exclude =
    src/lib/app/analytics,lib/app/converters,lib/app/input_converters


[testenv:mypy]
deps=
    mypy
    -rrequirements.txt
skip_install =
    true
basepython =
    python3
commands=
    mypy lib --ignore-missing-imports
exclude =
    src/lib/app/analytics,lib/app/converters,lib/app/input_converters

[testenv:coverage]
deps =
    {[testenv]deps}
    pytest-cov==2.8.1
basepython =
    python3
commands =
    pytest -q --cov-report term --cov='src/' --cov-fail-under=80 {posargs}

[testenv:pre-commit]
deps =
    pre-commit
skip_install =
    true
basepython =
    python3
commands =
    pre-commit run --all-files

[testenv:type]
description = run type checks
deps =
    mypy>=0.991
commands =
    mypy {posargs:src tests}

