-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make spectral-cube optional dependency #62
Comments
@astrofrog do you have an idea how to conditionally enable a |
This is still a pain for us. Occasionally we get help call about some dependency from this package that broke Jdaviz installation, some CASA IO stuff that we never use. |
FWIW the "brute force" way of putting the entire translator into a try:
from spectral_cube import SpectralCube just works; would only need to update the tests to probe for And maybe putting the whole import into a wrapper file somehow like in https://github.com/glue-viz/glue/blob/f8c1e9646e7252aa13f5f58c4838cb9b670875d3/glue/core/data_factories/dendrogram.py#L6-L7 |
This is too hacky? Change this:
To this: try:
from spectral_cube import SpectralCube, BooleanArrayMask
except ImportError:
class SpectralCube:
pass
BooleanArrayMask = None |
Definitely much shorter, looks OK to me as well. 😃 |
This comment was marked as outdated.
This comment was marked as outdated.
Okay, I would like to apologize for blaming that on spectral-cube, it is actually glue-core. I'll open a separate issue about that. |
glue-astronomy
pulls inspectral-cube
no matter what but Jdaviz does not need it anymore. Also see:We cannot make
glue-astronomy
an optional dependency but we also do not wantspectral-cube
to be installed unnecessarily.The text was updated successfully, but these errors were encountered: