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
MNT: Remove deprecated dms_to_degrees and hms_to_hours #15205
Conversation
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
👋 Thank you for your draft pull request! Do you know that you can use |
488e7e2
to
d996820
Compare
The diff is a bit more drastic than I thought from the original issue description, but I think the changes make sense. CI is green now, please review. Should get this in sooner than later so downstream has time to adapt. Thanks! |
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.
This looks like a good cleanup, but the pull request contains unrelated changes (even if I agree that those changes are for the better) and instead of NotImplementedError
we should be using TypeError
.
a = Angle("12 32 99", unit=u.degree) | ||
Angle("12 32 99", unit=u.degree) |
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.
Not assigning values to variables that never get used is a good change, but it shouldn't be included in the commit that removes deprecated code.
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.
It is a refactoring that will never get backported, so I don't see a big deal. I can undo these changes but I probably won't come back to do just this clean up.
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.
I'm happy for you to leave them in, since you've done them. A new PR is enough of a pain that sometimes one just fixes up little things in unrelated ones... (well, I certainly do, even though I sometimes complain about it too!!)
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.
OK I am keeping these then. Sorry for the eye sore. I will try to control myself better next time.
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.
Opening a separate PR for this should not be necessary, but I'd rather move these to a separate commit myself than keep everything in a single commit.
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.
I'd rather move these to a separate commit myself than keep everything in a single commit.
That is even more work for me than just removing them. It is Friday and I want to move this off my todo. Should I just remove the changes you don't like even though you agree they are good changes?
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.
For many of these tests the best thing to do (but clearly beyond the scope of this pull request) would be to rewrite them as parametrized tests. For doing that the changes in question will not be important and applying them would create code churn. So if you want to undo these changes then that's fine with me.
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.
@eerovaher - I think you maybe take @pllim too literally: we all agree these changes are good, but differ on whether it is worth the work and CI time to split things up in separate PRs or commits just so the commit history is a bit cleaner. @pllim wants to be done (and I'd rather she have as much time as possible to continue to keep things afloat!), and feels this is not worth more work, while you seem to feel differently. While I like how you have made astropy better in having single, well-contained commits and PRs, here to me the effort-to-value ratio (in both work and CI time and thus CO2) really seems rather low. So, I suggest we just merge this. Or maybe you split how you like it and force-push? I'm sure @pllim would be OK with that (we've done that mutually often enough, just trying to optimize time spent).
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, @pllim! Annoying that this become more of a drag... Overall, looks good. My main comment is about the error message, plus a different suggestion for cleaning up the tests (though feel free to pick either @eerovaher's or mine).
a = Angle("12 32 99", unit=u.degree) | ||
Angle("12 32 99", unit=u.degree) |
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.
I'm happy for you to leave them in, since you've done them. A new PR is enough of a pain that sometimes one just fixes up little things in unrelated ones... (well, I certainly do, even though I sometimes complain about it too!!)
I think I have addressed all the comments. Please re-review. Thanks! |
This comment was marked as resolved.
This comment was marked as resolved.
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.
Looks good to me!
@eerovaher , are you okay to approve now or is there something else? |
The removed functionality was deprecated in astropy#13162.
e341a54
to
58d287b
Compare
I followed the suggestion of @mhvk and split this pull request into sensible commits myself. As I've explained earlier 58d287b is optional and it's fine to merge this pull request with or without it. |
I applied the requested changes myself.
Great! Deprecated stuff removed and tests at least somewhat improved. Enabling auto-merge. |
Aww, thank you so much for cleaning up after me. It is nice to see this merge after coming back from school event. Thanks again, you two! |
Description
This pull request is to fix #13179
p.s. Local tests failed miserably. Maybe acoordinates
maintainer should take over. It does not appear to be trivial to get rid of these.