astropy / specutils

An Astropy coordinated package for astronomical spectroscopy. Maintainers: @nmearl @rosteen @keflavich @eteq
http://specutils.readthedocs.io/en/latest/
161 stars 124 forks source link

Update spectrum class name from Spectrum1D to Spectrum #1126

Closed rosteen closed 3 months ago

rosteen commented 3 months ago

Does what it says on the tin - based on the result of https://github.com/astropy/specutils/discussions/1087. Spectrum1D will raise a deprecation warning when initialized for some deprecation period.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 75.80645% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 72.72%. Comparing base (4041081) to head (40ac61b). Report is 37 commits behind head on v2.0-dev.

Files Patch % Lines
specutils/io/default_loaders/apogee.py 25.00% 3 Missing :warning:
specutils/io/default_loaders/sdss.py 25.00% 3 Missing :warning:
specutils/io/default_loaders/sixdfgs_reader.py 25.00% 3 Missing :warning:
specutils/spectra/spectrum.py 75.00% 3 Missing :warning:
specutils/io/default_loaders/aaomega_2df.py 33.33% 2 Missing :warning:
specutils/io/default_loaders/twodfgrs_reader.py 33.33% 2 Missing :warning:
specutils/io/default_loaders/wcs_fits.py 71.42% 2 Missing :warning:
specutils/manipulation/smoothing.py 60.00% 2 Missing :warning:
specutils/manipulation/utils.py 75.00% 2 Missing :warning:
specutils/io/default_loaders/dc_common.py 50.00% 1 Missing :warning:
... and 7 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## v2.0-dev #1126 +/- ## ============================================ + Coverage 71.26% 72.72% +1.45% ============================================ Files 64 62 -2 Lines 4542 4487 -55 ============================================ + Hits 3237 3263 +26 + Misses 1305 1224 -81 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rosteen commented 3 months ago

Looks like the test failure is unrelated, I wonder if that MANGA file was removed or changed url or something...

rosteen commented 3 months ago

This is probably the most important part if anyone reviews:

@deprecated(since="2.0", alternative="Spectrum")
class Spectrum1D(Spectrum):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)