move tests to their own folder: this makes the code simpler to understand by reducing the size of the main modules
use dynamic (i.e., inferred at run time) absolute paths instead of relative paths: this fixes problems that can arise when running the code not from the intended folder
introduce a github action to automate the tests
As a bonus, while doing these changes, I chanced upon some code that was broken because it was still referring to pitch distributions instead of profiles. They have been fixed
This PR is still in draft for the following reasons:
~the codebase contains doctests which are still called through the main script within the code itself; I wonder if it's desirable and possible to move those doctests to the Tests folder, too~ Opened an issue to do this in a different PR
~the files chord_comparisons.py has tests define outside of the unittest framework; should we convert them to unittest?~ Done
a few tests still fail on my machine; some because of missing files and some probably because of modifications in the corpus. My proposal for the missing files is to rewrite those tests in a such a way that they produce those files temporarily and then discard them
~I still need to test the github action, and the way to do so is to create a mock PR~ The action doesn't seem to run yet. Probably it needs to be merged to master before?
This PR has three main contributions:
As a bonus, while doing these changes, I chanced upon some code that was broken because it was still referring to pitch distributions instead of profiles. They have been fixed
This PR is still in draft for the following reasons:
Tests
folder, too~ Opened an issue to do this in a different PRchord_comparisons.py
has tests define outside of the unittest framework; should we convert them to unittest?~ DoneCloses #55