OttoStruve / muler

A Python package for working with pipeline-produced spectra from IGRINS, HPF, and Keck NIRSPEC
https://muler.readthedocs.io
MIT License
14 stars 9 forks source link

Astropy 5.0 incompatibility with numpy, should switch to 5.0.1 for the tests #121

Closed kfkaplan closed 1 year ago

kfkaplan commented 2 years ago

When running tests for my pull request https://github.com/OttoStruve/muler/pull/89 I got the following error that caused the tests to fail:

  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/numpy/__init__.py", line 311, in __getattr__
[232](https://github.com/OttoStruve/muler/actions/runs/3340789537/jobs/5531285686#step:7:233)
    raise AttributeError("module {!r} has no attribute "
[233](https://github.com/OttoStruve/muler/actions/runs/3340789537/jobs/5531285686#step:7:234)
AttributeError: module 'numpy' has no attribute 'asscalar'
[234](https://github.com/OttoStruve/muler/actions/runs/3340789537/jobs/5531285686#step:7:235)
Error: Process completed with exit code 1.

After some investigation, this does not appear to be an issue with muler, but an incompatibility between Astropy 5.0 and below and the latest versions of Numpy. Numpy. asscalar() has been long depreciated and dropped apparently. You can see the fix for Astropy here https://github.com/astropy/astropy/issues/12534 and the solution is to use Astropy 5.0.1 instead of 5.0 as describe here where PlasmaPy ran into the same thing: https://github.com/PlasmaPy/PlasmaPy/pull/1727

The solution is to bump up the version of astropy that the tests use from 5.0 to at least 5.0.1. I will look into how that is done.

kfkaplan commented 1 year ago

Fixed with newer version of astropy.