aplpy / aplpy

Astronomical Plotting Library in Python
http://aplpy.github.com
Other
171 stars 82 forks source link

Package status: no longer maintained? #467

Closed olebole closed 2 years ago

olebole commented 2 years ago

With the new versions of astropy and numpy, aplpy 2.0.3 cannot be no longer build (and tested) properly, and a new version does not exist yet. Also the latest HEAD does not work anymore because the deprecation warning in #463 is now an error:

aplpy/__init__.py:14: in <module>
    from .core import FITSFigure  # noqa
aplpy/core.py:18: in <module>
    from astropy.nddata.utils import block_reduce
E   ImportError: cannot import name 'block_reduce' from 'astropy.nddata.utils' (/usr/lib/python3/dist-packages/astropy/nddata/utils.py)

Is it still worth to keep the package in Debian (and to apply #464) or will aplpy probably die within the next 1-2 years? (Sorry for asking so directly). The (optional) reverse dependency I see is spectral-cube.

When applying #464 and #466 to the latest HEAD, aplpy still passes all tests with Python 3.9 and 3.10 and the current dependency set (astropy 5.0, matplotlib etc.).

stargaser commented 2 years ago

Maybe @astrofrog has the answer? I could help out with maintenance if the plan is to keep this package going.

chukus commented 2 years ago

Hello, I also got this problem. I installed spectral_cube so I can work with some data and then aplpy stopped working with this message

import aplpy File "/media/croman/DATA/anaconda3/lib/python3.8/site-packages/aplpy/init.py", line 14, in from .core import FITSFigure # noqa File "/media/croman/DATA/anaconda3/lib/python3.8/site-packages/aplpy/core.py", line 20, in from astropy.nddata.utils import block_reduce ImportError: cannot import name 'block_reduce' from 'astropy.nddata.utils' (/media/croman/DATA/anaconda3/lib/python3.8/site-packages/astropy/nddata/utils.py)

This can be a problem, because I just submitted a paper with dozens of maps made with AplPy! Is there a way to have spectral_cube working with AplPy currently? Actually some of the spectralcube doc examples suggest to use AplPy!

coude commented 2 years ago

Until the library is updated, a temporary solution would be to install a previous version of Astropy in a different environment to circumvent the current deprecation of block_reduce. That's how I still get it to work, anyway. That should let you update your plots as needed, while still allowing you to work with spectral_cube in your most up-to-date environment.

With that said, since spectral_cube mentions AplPy in the doc, it's very likely that an older version of Astropy would even let you use both simultaneously.

The README does have the minimal version required for each library used by AplPY.

I hope this helps a bit!

chukus commented 2 years ago

Until the library is updated, a temporary solution would be to install a previous version of Astropy in a different environment to circumvent the current deprecation of block_reduce. That's how I still get it to work, anyway. That should let you update your plots as needed, while still allowing you to work with spectral_cube in your most up-to-date environment.

With that said, since spectral_cube mentions AplPy in the doc, it's very likely that an older version of Astropy would even let you use both simultaneously.

The README does have the minimal version required for each library used by AplPY.

I hope this helps a bit!

Thanks! this for sure helps me. I will definitely install the previous version in a separate environment. At least this allowed me to confirm that I was actually using the current versions.

chukus commented 2 years ago

Hi again guys, I made a virtual environment, installed AplPy with Astropy 3.1, tried with both AplPy 2.0.3 and AplPy 1.1 and still cannot import aplpy in my script. I would appreciate any suggestions...

Traceback (most recent call last): File "CygX_ANMT_Map.py", line 1, in import aplpy File "/media/croman/DATA/anaconda3/lib/python3.8/site-packages/aplpy/init.py", line 14, in from .core import FITSFigure # noqa File "/media/croman/DATA/anaconda3/lib/python3.8/site-packages/aplpy/core.py", line 20, in from astropy.nddata.utils import block_reduce ImportError: cannot import name 'block_reduce' from 'astropy.nddata.utils' (/media/croman/DATA/anaconda3/lib/python3.8/site-packages/astropy/nddata/utils.py)

astrofrog commented 2 years ago

I've just released aplpy 2.1.0 which includes the fix for the compatibility with astropy 5.0

olebole commented 2 years ago

Thank you @astrofrog!

chukus commented 2 years ago

Thank you !!!! will test right away

bmarcote commented 2 years ago

Thank you @astrofrog for all the great work you put on this!