radio-astro-tools / casa-formats-io

Code to handle I/O from/to data in CASA format
Other
10 stars 7 forks source link

[0.2.2] Pytest error when glue is not installed #60

Closed olebole closed 5 months ago

olebole commented 8 months ago

When the glue package is not installed, pytest produces an error:

============================= test session starts ==============================
platform linux -- Python 3.11.7, pytest-7.4.4, pluggy-1.3.0 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('[…]/casa-formats-io/.hypothesis/examples'))
rootdir: […]/casa-formats-io
configfile: setup.cfg
plugins: anyio-4.0.0, asdf-3.0.1, astropy-header-0.2.2, hypothesis-6.93.2, astropy-0.11.0, cov-4.1.0, arraydiff-0.6.1, filter-subpackage-0.1.2, doctestplus-1.1.0, mock-3.12.0, remotedata-0.4.1
collected 77 items / 1 error                                                   

==================================== ERRORS ====================================
_______________ ERROR collecting casa_formats_io/glue_factory.py _______________
casa_formats_io/glue_factory.py:7: in <module>
    from glue.core import Data
E   ModuleNotFoundError: No module named 'glue'
astrofrog commented 5 months ago

@olebole - is this still an issue?

olebole commented 5 months ago

Can you upload the latest release to PyPI? That would make it easier for me to pick up.

astrofrog commented 5 months ago

v0.3.0 is on PyPI - however I think it is probably going to still be an issue

olebole commented 5 months ago

There was a problem with my autodownload because underscores were used instead of dashes in the tar.gz file name. I made this more flexible now in the scan script

I can however confirm that this does not happen anymore with version 0.3.0; both with and without glue the tests pass (most tests are skipped w/o the glue package).