Fountain Coach Gitowner-controlled · read only

basic-pitch.git · tox.ini

basic-pitch.git / tox.ini

revision bc705a12d4d78bc9296d1fef3066803cfdd7d77e · complete file

[tox]
envlist = py38,py39,py310,py311,full,data,manifest,check-formatting,lint,mypy
skipsdist = True
usedevelop = True
requires =
    setuptools>=60
    wheel
    pip>=24

# Tests with the minimal package (either coreml/onnx/tflite)
[testenv]
deps = -e .[test]
commands =
    pytest tests --ignore tests/test_nn.py --ignore tests/data {posargs}
setenv =
    SOURCE = {toxinidir}/basic_pitch
    TEST_SOURCE = {toxinidir}/tests
    LINE_LENGTH = "120"

# Tests with TF
[testenv:full]
deps = -e .[dev]
commands =
    pytest tests {posargs}
setenv =
    SOURCE = {toxinidir}/basic_pitch
    TEST_SOURCE = {toxinidir}/tests
    LINE_LENGTH = "120"

[testenv:data]
deps = -e .[data]
commands = 
    pytest tests/data {posargs}

[testenv:manifest]
deps = check-manifest
skip_install = true
commands = check-manifest --ignore 'tests'

[testenv:check-formatting]
basepython = python3.10
deps = black
skip_install = true
commands =
    black {env:SOURCE} tests --line-length {env:LINE_LENGTH} --diff --check

[testenv:format]
basepython = python3.10
deps = black
skip_install = true
commands =
    black {env:SOURCE} tests --line-length {env:LINE_LENGTH}

[testenv:lint]
basepython = python3.10
deps = flake8
skip_install = true
commands = flake8

[testenv:mypy]
basepython = python3.10
deps =
    mypy
commands = mypy basic_pitch tests --strict --ignore-missing-imports --allow-subclassing-any

[flake8]
show-source = true
max-line-length = 120
exclude = .venv,.tox,.git,dist,doc,*.egg,build
ignore = E203,E731,W503,E231
per-file-ignores = __init__.py:F401

[pytest]
addopts = -v
testpaths = tests