A lightweight yet powerful audio-to-MIDI converter with pitch bend detection
Python audiolightweightmachine-learningmidimusicpitch-detectionpolyphonicpythontranscriptiontypescript
simplified / created train environment and testenv in tox.ini and pyproject.toml. Moved all tests relating to data into their own test directory. Updated path to resources accordingly.
Benjie Genchel4975d8291d9b
diff --git a/pyproject.toml b/pyproject.tomlindex 3762def..f6957ed 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -22,7 +22,6 @@ dependencies = ["apache_beam","librosa>=0.8.0","mir_eval>=0.6",- "mirdata","numpy>=1.18","onnxruntime; platform_system == 'Windows' and python_version < '3.11'","pretty_midi>=0.2.9",@@ -32,8 +31,6 @@ dependencies = ["tensorflow>=2.4.1,<2.15.1; platform_system != 'Darwin' and python_version >= '3.11'","tensorflow-macos>=2.4.1,<2.15.1; platform_system == 'Darwin' and python_version > '3.11'","tflite-runtime; platform_system == 'Linux' and python_version < '3.11'",- "smart_open",- "sox","typing_extensions",]@@ -56,6 +53,7 @@ basic-pitch = "basic_pitch.predict:main"[project.optional-dependencies]train = [+ "basic_pitch[tf,test]","apache_beam","mirdata","smart_open",@@ -77,7 +75,7 @@ coreml = ["coremltools"]onnx = ["onnxruntime"]docs = ["mkdocs>=1.0.4"]dev = [- "basic_pitch[test,tf,coreml,onnx,docs]",+ "basic_pitch[train,test,tf,coreml,onnx,docs]","mypy","tox","mirdata"diff --git a/tests/test_guitarset.py b/tests/data/test_guitarset.pysimilarity index 97%rename from tests/test_guitarset.pyrename to tests/data/test_guitarset.pyindex 6fb0919..7701ca6 100644--- a/tests/test_guitarset.py+++ b/tests/data/test_guitarset.py@@ -29,7 +29,7 @@ from basic_pitch.data.datasets.guitarset import ()from basic_pitch.data.pipeline import WriteBatchToTfRecord-RESOURCES_PATH = pathlib.Path(__file__).parent / "resources"+RESOURCES_PATH = pathlib.Path(__file__).parent.parent / "resources"TRACK_ID = "00_BN1-129-Eb_comp"diff --git a/tests/test_pipeline.py b/tests/data/test_pipeline.pysimilarity index 100%rename from tests/test_pipeline.pyrename to tests/data/test_pipeline.pydiff --git a/tests/test_tf_example_serialization.py b/tests/data/test_tf_example_serialization.pysimilarity index 100%rename from tests/test_tf_example_serialization.pyrename to tests/data/test_tf_example_serialization.pydiff --git a/tox.ini b/tox.iniindex 091df5f..41a7006 100644--- a/tox.ini+++ b/tox.ini@@ -11,7 +11,7 @@ requires =[testenv]deps = -e .[test]commands =- pytest tests --ignore tests/test_nn.py {posargs}+ pytest tests --ignore tests/test_nn.py --ignore tests/data {posargs}setenv =SOURCE = {toxinidir}/basic_pitchTEST_SOURCE = {toxinidir}/tests@@ -27,6 +27,15 @@ setenv =TEST_SOURCE = {toxinidir}/testsLINE_LENGTH = "120"+[testenv:train]+deps = -e .[train]+commands =+ pytest tests/data {posargs}+setenv =+ SOURCE = {toxinidir}/basic_pitch+ TEST_SOURCE = {toxinidir}/tests/data+ LINE_LENGTH = "120"+[testenv:manifest]deps = check-manifestskip_install = true