Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependencies for tests #540

Closed
bmcfee opened this issue Nov 8, 2021 · 1 comment · May be fixed by #546
Closed

Missing dependencies for tests #540

bmcfee opened this issue Nov 8, 2021 · 1 comment · May be fixed by #546
Labels
tests changes to tests

Comments

@bmcfee
Copy link
Contributor

bmcfee commented Nov 8, 2021

In setting up mirdata for a new environment, I was unable to run the tests by following the instructions.

In this specific case, I had not installed music21 because it was not listed as a dependency (for tests). The test suite then failed to run:

―――――――――――――― ERROR collecting tests/datasets/test_haydn_op20.py ――――――――――――――
ImportError while importing test module '/home/bmcfee/git/mirdata/tests/datasets/test_haydn_op20.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../miniconda/envs/py39/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/datasets/test_haydn_op20.py:1: in <module>
    import music21
E   ModuleNotFoundError: No module named 'music21'

Fixing this one, I then ran into the same kind of problem from DALI:

――――――――――――――――――――――――――――――――――――― ERROR collecting tests/datasets/test_dali.py ―――――――――――――――――――――――――――――――――――――
ImportError while importing test module '/home/bmcfee/git/mirdata/tests/datasets/test_dali.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../miniconda/envs/py39/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/datasets/test_dali.py:1: in <module>
    import DALI
E   ModuleNotFoundError: No module named 'DALI'

The more general problem here is a disconnect between optional dependencies for individual datasets and those required for tests. Is there a reason to keep these extras_requires out of the tests dependencies? Or is there a way to bypass these cases at test time?

@harshpalan
Copy link
Collaborator

Fixed with #567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests changes to tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants