-
-
Notifications
You must be signed in to change notification settings - Fork 41
Compatibility with specutils 2.0 #260
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #260 +/- ##
==========================================
+ Coverage 87.19% 87.74% +0.54%
==========================================
Files 13 15 +2
Lines 1179 1289 +110
==========================================
+ Hits 1028 1131 +103
- Misses 151 158 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm devdeps fail for me locally with astropy 7.0.1 but not here using astropy 7.1.dev. So this means something unreleased in astropy is required for specreduce to work with specutils 2.0, which probably means specutils 2.0 cannot be released before either astropy 7.0.2 or 7.1, depending on what PR is involved over at astropy; @rosteen do you remember?
Returns | ||
------- | ||
`~specutils.Spectrum1D` object with same shape as ``image``. | ||
spec : `~specutils.Spectrum1D` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Sphinx ref will have to be updated separately after specutils 2.0 stable is released and RTD picks up specutils 2.0. Might have to do a special requirements file for doc build or pin specutils>=2
here:
Line 25 in 6a0b915
docs = [ |
But nothing we can do right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ignore my other comment, then.
For example: | ||
For example:: | ||
>>> standard_sensfunc(obj_wave, obj_flux, stdstar='spec50cal/bd284211.dat', mode='spline') # doctest: +SKIP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no intention to run this through doctest, omitting >>>
is enough to stop it from being collected by pytest-doctestplus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that's a pretty old example that, iirc, dates back to before specreduce-data
was split into its own repository. it should definitely be skipped by doctest one way or the other. if omitting >>>
is a preferred method, might as well do that here.
based on all the work required here, i suspect this transition will be painful for a lot of packages that use |
Doh... The devdeps here is I see the same failures locally with specutils 2.0 + astropy 7.1.dev , so the compatibility problem remains. |
Okay, mystery solved. devdeps here now gives the same traceback as integration testing when I switch dev specutils to install from its 2.0 branch. |
and fix style check
Co-authored-by: Ricky O'Steen <39831871+rosteen@users.noreply.github.com>
and remove unnecessary style changes
Thanks to @rosteen upstream fix, unless there are more changes upstream, I think this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for doing all the leg-work to get this compatibility set up. i will most likely borrow some of these tricks for other projects that will need to support both 1.x and 2.x of specutils
...
i'm approving, though it'd be nice to fix some of the test coverage that's missing to keep codecov
happy. however, it looked like some of what was "missing" should be covered with the right devdeps
test. so maybe adding a devdeps-cov
job is all that's needed.
This comment was marked as resolved.
This comment was marked as resolved.
Excellent work, @pllim! Do you want me to hold off on merging until you've added the |
but be careful what you wish for since devdeps can be unstable
Okay added coverage to devdeps but that job can be unstable so YMMV. |
Thanks, merged! |
Fix #259
Plus some minor clean-ups.