-
Notifications
You must be signed in to change notification settings - Fork 282
/
tox.ini
75 lines (65 loc) · 1.55 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[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