basic-pitch.git · tox.ini
basic-pitch.git / tox.ini
revision 034d5f965c8fa813caa780482ed6ef4ac4bca01e · 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