[tox]
requires =
    tox>=4.2
env_list =
    lint
    mypy
    py{py3, 314, 313, 312, 311, 310, 39}

[testenv]
extras =
    tests
pass_env =
    FORCE_COLOR
commands =
    coverage erase
    {envpython} -m pytest \
      --cov osmviz \
      --cov test \
      --cov-append test/unit \
      {posargs}
    {envpython} -m pytest \
      --cov osmviz \
      --cov test \
      --cov-append test/functional/test_manager.py \
      {posargs}
    coverage html
    coverage xml

[testenv:lint]
skip_install = true
deps =
    pre-commit
pass_env =
    PRE_COMMIT_COLOR
commands =
    pre-commit run --all-files --show-diff-on-failure

[testenv:mypy]
deps =
    -r requirements-mypy.txt
commands =
    mypy . {posargs}

[testenv:py310]
deps =
    tqdm
