diff --git a/.codecov.yml b/.codecov.yml index 61b01ca48..d5abcd73f 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -2,4 +2,4 @@ coverage: status: patch: false -comment: off \ No newline at end of file +comment: off diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..d674beb1f --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +ignore = E203,W503,Q000 +max-line-length = 80 +per-file-ignores = + */__init__.py: F401 + tests/***.py: F405 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..f65dbfc4e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: # for a list of hooks see https://github.com/pre-commit/pre-commit-hooks + - id: check-added-large-files + args: ['--maxkb=100'] + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-json + - id: check-shebang-scripts-are-executable + - id: check-merge-conflict + - id: check-symlinks + - id: check-yaml + - id: destroyed-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: file-contents-sorter + - id: mixed-line-ending + - id: no-commit-to-branch + - id: pretty-format-json + - id: requirements-txt-fixer + - id: sort-simple-yaml + - id: trailing-whitespace + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.9.2 + hooks: + - id: flake8 diff --git a/bin/KeyRecognition b/bin/KeyRecognition index 885b8a247..fb1fcdad5 100755 --- a/bin/KeyRecognition +++ b/bin/KeyRecognition @@ -24,7 +24,7 @@ def main(): Filip Korzeniowski and Gerhard Widmer, "Genre-Agnostic Key Classification with Convolutional Neural Networks", - In Proceedings of the 19th International Society for Music Information + In Proceedings of the 19th International Society for Music Information Retrieval Conference (ISMIR), Paris, France, 2018. This program can be run in 'single' file mode to process a single audio diff --git a/docs/requirements.txt b/docs/requirements.txt index 6330f244a..046e39e3b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ # fake requirements for readthedocs cython -numpydoc mido +numpydoc diff --git a/requirements.txt b/requirements.txt index 9fe2a6e33..e0a5414ef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy>=1.13.4 -scipy>=0.16 cython>=0.25 mido>=1.2.6 +numpy>=1.13.4 +scipy>=0.16 diff --git a/tests/data/annotations/dummy.chords b/tests/data/annotations/dummy.chords index aa4b40daa..2eb18f7c0 100644 --- a/tests/data/annotations/dummy.chords +++ b/tests/data/annotations/dummy.chords @@ -1,4 +1,4 @@ 0.1 1.0 A:min 1.0 2.0 F:maj 2.0 3.0 C:maj -3.0 4.0 G:maj \ No newline at end of file +3.0 4.0 G:maj diff --git a/tests/data/annotations/dummy.key b/tests/data/annotations/dummy.key index c5d486a43..cef3d41f8 100644 --- a/tests/data/annotations/dummy.key +++ b/tests/data/annotations/dummy.key @@ -1 +1 @@ -F# minor \ No newline at end of file +F# minor diff --git a/tests/data/detections/dummy.chords.txt b/tests/data/detections/dummy.chords.txt index 4bf609493..ca1900a49 100644 --- a/tests/data/detections/dummy.chords.txt +++ b/tests/data/detections/dummy.chords.txt @@ -6,4 +6,4 @@ 2.2 2.9 C:maj/3 2.9 3.5 G:maj7/7 3.5 4.1 G:aug -4.1 4.3 N \ No newline at end of file +4.1 4.3 N diff --git a/tests/data/detections/dummy.key.txt b/tests/data/detections/dummy.key.txt index 689085649..52cf6f3a3 100644 --- a/tests/data/detections/dummy.key.txt +++ b/tests/data/detections/dummy.key.txt @@ -1 +1 @@ -a maj \ No newline at end of file +a maj diff --git a/tests/data/detections/sample.key_recognition.txt b/tests/data/detections/sample.key_recognition.txt index 4e5f337ce..d2da55a8f 100644 --- a/tests/data/detections/sample.key_recognition.txt +++ b/tests/data/detections/sample.key_recognition.txt @@ -1 +1 @@ -Ab major \ No newline at end of file +Ab major diff --git a/tests/data/detections/sample2.key_recognition.txt b/tests/data/detections/sample2.key_recognition.txt index 56a7832e2..0e41a14fe 100644 --- a/tests/data/detections/sample2.key_recognition.txt +++ b/tests/data/detections/sample2.key_recognition.txt @@ -1 +1 @@ -A minor \ No newline at end of file +A minor