From 6b320e295aab55924cd013ec977087ba99aa5eaa Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 16:40:44 +0800 Subject: [PATCH 01/14] Add seaborn to requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 25df434..87e78d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ sphinx numpydoc flake8 pytest +seaborn From 949628fd3325e1533ff6f9775ed3ba89c3bd8de7 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 18:22:10 +0800 Subject: [PATCH 02/14] uncomment 2 functions in test_toymir.py --- toymir/tests/test_toymir.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toymir/tests/test_toymir.py b/toymir/tests/test_toymir.py index f1f72be..ca61f9b 100644 --- a/toymir/tests/test_toymir.py +++ b/toymir/tests/test_toymir.py @@ -18,14 +18,14 @@ def test_midi_to_hz_array(): # These are the two tests you should uncomment! -# def test_hz_to_midi_float(): -# expected = 69 -# assert toymir.hz_to_midi(440.0) == expected +def test_hz_to_midi_float(): + expected = 69 + assert toymir.hz_to_midi(440.0) == expected -# def test_hz_to_midi_array(): -# expected = [57, 69, 81] -# assert np.allclose(toymir.hz_to_midi([220.0, 440.0, 880.0]), expected) +def test_hz_to_midi_array(): + expected = [57, 69, 81] + assert np.allclose(toymir.hz_to_midi([220.0, 440.0, 880.0]), expected) # Hello! You could add the missing test for test_hz_to_midi here! From 268d9de1a91aa89cee9dadeb88d2a2d0a21f2571 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 18:23:05 +0800 Subject: [PATCH 03/14] uncomment an implementation in freq.py --- toymir/freq.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toymir/freq.py b/toymir/freq.py index 311890f..bd9ca27 100644 --- a/toymir/freq.py +++ b/toymir/freq.py @@ -38,12 +38,12 @@ def hz_to_midi(frequencies): # Oh hey, it's Part 5! You could uncomment this implementation, # and then the tests will pass! - # less_than_zero = (np.asanyarray(frequencies) <= 0).any() + less_than_zero = (np.asanyarray(frequencies) <= 0).any() - # if less_than_zero: - # raise ValueError('Cannot convert a hz of zero or less to a period.') + if less_than_zero: + raise ValueError('Cannot convert a hz of zero or less to a period.') - # return 12 * (np.log2(np.asanyarray(frequencies)) - np.log2(440.0)) + 69 + return 12 * (np.log2(np.asanyarray(frequencies)) - np.log2(440.0)) + 69 def hz_to_period(frequencies): From 7860d2d25e3ec5199affe9095001d342e94d5951 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 18:49:24 +0800 Subject: [PATCH 04/14] change travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3a164f4..8185273 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ install: - travis_retry pip install -e . script: -# - flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` + - flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` # - pytest --pyargs toymir --cov-report term-missing --cov=toymir - pytest From b6247f9f3a90d04377c7e42dec3fdf240f8db7be Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 19:16:56 +0800 Subject: [PATCH 05/14] add flake8 & test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8185273..3b2dbe9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: script: - flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` -# - pytest --pyargs toymir --cov-report term-missing --cov=toymir + - pytest --pyargs toymir --cov-report term-missing --cov=toymir - pytest # Hey, this block (and the above arguments to pytest ) From 3605fe38b5d0c07c0f003690c9c86380f4e531c8 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 19:24:09 +0800 Subject: [PATCH 06/14] remove extra import --- toymir/freq.py | 1 - 1 file changed, 1 deletion(-) diff --git a/toymir/freq.py b/toymir/freq.py index bd9ca27..aa4b4d5 100644 --- a/toymir/freq.py +++ b/toymir/freq.py @@ -1,5 +1,4 @@ import numpy as np -import seaborn # trap to make tests fail! def midi_to_hz(notes): From cfc13e5873bb3e9a56bb23826afc7cff9fbf1acf Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 19:36:39 +0800 Subject: [PATCH 07/14] update travis --- toymir.egg-info/PKG-INFO | 31 ++++++++++++++++++++++++++++ toymir.egg-info/SOURCES.txt | 14 +++++++++++++ toymir.egg-info/dependency_links.txt | 1 + toymir.egg-info/requires.txt | 1 + toymir.egg-info/top_level.txt | 1 + 5 files changed, 48 insertions(+) create mode 100644 toymir.egg-info/PKG-INFO create mode 100644 toymir.egg-info/SOURCES.txt create mode 100644 toymir.egg-info/dependency_links.txt create mode 100644 toymir.egg-info/requires.txt create mode 100644 toymir.egg-info/top_level.txt diff --git a/toymir.egg-info/PKG-INFO b/toymir.egg-info/PKG-INFO new file mode 100644 index 0000000..7b7752c --- /dev/null +++ b/toymir.egg-info/PKG-INFO @@ -0,0 +1,31 @@ +Metadata-Version: 1.2 +Name: toymir +Version: 0.1.dev0 +Summary: toymir: a toy package for learning about OSS in MIR +Home-page: http://github.com/bmcfee/ismir2018-oss-tutorial +Author: Brian McFee +Author-email: brian.mcfee@nyu.edu +Maintainer: Brian McFee +Maintainer-email: brian.mcfee@nyu.edu +License: MIT +Description: + + toymir + ======== + toymir is a small Python package for use in the ISMIR 2018 tutorial on + open source software and reproducibility. + + It is based on the Shablona_ package, developed by Ariel Rokem at the + University of Washington eScience Institute. + + .. _Shablona: https://github.com/uwescience/shablona + +Platform: OS Independent +Classifier: Development Status :: 3 - Alpha +Classifier: Environment :: Console +Classifier: Intended Audience :: Science/Research +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Topic :: Scientific/Engineering +Requires: numpy diff --git a/toymir.egg-info/SOURCES.txt b/toymir.egg-info/SOURCES.txt new file mode 100644 index 0000000..5a30789 --- /dev/null +++ b/toymir.egg-info/SOURCES.txt @@ -0,0 +1,14 @@ +README.md +setup.py +toymir/__init__.py +toymir/freq.py +toymir/version.py +toymir.egg-info/PKG-INFO +toymir.egg-info/SOURCES.txt +toymir.egg-info/dependency_links.txt +toymir.egg-info/requires.txt +toymir.egg-info/top_level.txt +toymir/data/ortho.csv +toymir/data/para.csv +toymir/tests/__init__.py +toymir/tests/test_toymir.py \ No newline at end of file diff --git a/toymir.egg-info/dependency_links.txt b/toymir.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/toymir.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/toymir.egg-info/requires.txt b/toymir.egg-info/requires.txt new file mode 100644 index 0000000..24ce15a --- /dev/null +++ b/toymir.egg-info/requires.txt @@ -0,0 +1 @@ +numpy diff --git a/toymir.egg-info/top_level.txt b/toymir.egg-info/top_level.txt new file mode 100644 index 0000000..17abe18 --- /dev/null +++ b/toymir.egg-info/top_level.txt @@ -0,0 +1 @@ +toymir From 0049c72c8209190c77ff54059eddcc2097fd3cb3 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 19:40:41 +0800 Subject: [PATCH 08/14] update travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3b2dbe9..a4958ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: script: - flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` - - pytest --pyargs toymir --cov-report term-missing --cov=toymir + #- pytest --pyargs toymir --cov-report term-missing --cov=toymir - pytest # Hey, this block (and the above arguments to pytest ) From b86cd99c9e6c8eb13a47cec6546cf3a46dad0329 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 19:51:15 +0800 Subject: [PATCH 09/14] no flake --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a4958ae..5824e73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ install: - travis_retry pip install -e . script: - - flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` + #- flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` #- pytest --pyargs toymir --cov-report term-missing --cov=toymir - pytest From ee7c42272ee8e55366e3118a0bea1a6331ccb1c0 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 20:19:17 +0800 Subject: [PATCH 10/14] update flake8 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5824e73..3b2dbe9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ install: - travis_retry pip install -e . script: - #- flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` - #- pytest --pyargs toymir --cov-report term-missing --cov=toymir + - flake8 --ignore N802,N806,E501 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/` + - pytest --pyargs toymir --cov-report term-missing --cov=toymir - pytest # Hey, this block (and the above arguments to pytest ) From e25c0c097860bfce36f9b8545df6690e43ebaf12 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 20:23:17 +0800 Subject: [PATCH 11/14] update flake8 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3b2dbe9..fb7491f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: python: - '3.5' - '3.6' + - '3.7' install: From e603ede282d3a4b98b7cfd911d3fdc4ba19a9f78 Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 20:26:07 +0800 Subject: [PATCH 12/14] update flake8 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb7491f..716785a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ env: - PIP_DEPS="pytest coveralls pytest-cov flake8" python: - - '3.5' - - '3.6' +# - '3.5' +# - '3.6' - '3.7' From 897198c9781bc6e7d3f8a98910ab81f09305e60f Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 20:29:41 +0800 Subject: [PATCH 13/14] update travis --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 716785a..3e34ab8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: python +"os": [ + "windows" + ] sudo: false env: From ccf3952a952e193a1f6ca824381cac572a8d260a Mon Sep 17 00:00:00 2001 From: bwang64 Date: Thu, 27 May 2021 20:34:36 +0800 Subject: [PATCH 14/14] no flake --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e34ab8..3e39a05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ language: python -"os": [ - "windows" - ] -sudo: false +sudo: true env: global: