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

Matplotlib from conda missing baseline images when pyinseq --test is called #83

Open
eburgoswisc opened this issue Aug 10, 2021 · 1 comment

Comments

@eburgoswisc
Copy link
Collaborator

The --test option of pyinseq, which uses pytest in the rootdir, throws this exception when called:

$ pyinseq --test
2021-08-09 14:55 - INFO - pyinseq - Process command line arguments
=============================================================================================== test session starts ===============================================================================================
platform darwin -- Python 3.6.13, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/emanuelburgos/opt/miniconda3/envs/test_pyinseq_py36/lib/python3.6/site-packages
plugins: cov-2.12.1
collected 0 items / 1 error                                                                                                                                                                                       

===================================================================================================== ERRORS ======================================================================================================
__________________________________________________________________________________________ ERROR collecting test session __________________________________________________________________________________________
../importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:994: in _gcd_import
    ???
<frozen importlib._bootstrap>:971: in _find_and_load
    ???
<frozen importlib._bootstrap>:941: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:994: in _gcd_import
    ???
<frozen importlib._bootstrap>:971: in _find_and_load
    ???
<frozen importlib._bootstrap>:955: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:665: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:678: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
matplotlib/tests/__init__.py:7: in <module>
    'The baseline image directory does not exist. '
E   OSError: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.
============================================================================================= short test summary info =============================================================================================
ERROR  - OSError: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.

I believe this happens because calling pytest.main() does not correctly append the test directories to the PYTHONPATH. For now, you can clone the source code (or cd into site-packages/pyinseq in your python architecture) to verify the software. However, this will not cause issues since TravisCI testing frameworks are implemented in the pyinseq github

@mandel01
Copy link
Collaborator

The tests passed on the TravisCI instance. It looks like that is because the software is installed via pip there. Once this issue is addressed, can we redesign the Travis script so that the installation on Travis mirrors a user's conda installation?

It seems to me there is a chicken-and-egg issue here (the commits here need to be in place before they appear in conda!). Perhaps there is a clever solution...

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

No branches or pull requests

2 participants