Repository navigation
TST: re-unify a testing function previously copy-pasted (and patched) accross 4 modules (⏰ wait for #17189) - #17051
neutrinoceros wants to merge 3 commits into
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 |
89359df to
8b88b5a
Compare
mhvk
left a comment
There was a problem hiding this comment.
Nice! I think the appropriate place may be astropy/tests/helper.py - this is also where assert_quantity_allclose lives.
I think that makes sense because this is really not that io specific. But if we keep it in io, it should be in io/tests - that's also where mixin_column.py lives.
|
p.s. If we put it in |
seems like the natural place to put it indeed, I just notices that we could also make the following improvement then: - assert quantity_allclose(a1, a2, rtol=1e-15)
+ assert_quantity_allclose(a1, a2, rtol=1e-15) |
|
I'll push the polished version of the unified function now and I'll add a changelog later |
c09705b to
2be337e
Compare
|
The warning I get on RTD seems unrelated but I can't seem to reproduce it locally. In fact |
2be337e to
108ca62
Compare
mhvk
left a comment
There was a problem hiding this comment.
Some small nits, but overall looks good!
|
@mhvk I should have addressed all your comments |
mhvk
left a comment
There was a problem hiding this comment.
Only total nits left. Let me ping @taldcroft since I think he wrote the original.
445858d to
c0e108f
Compare
|
Looking through PRs that are milestoned for 7.0, this one I think definitely should go in - it really is just a question where we think the more standardized function should live. I'm all for keeping things simple if that gets it done. @eerovaher - since you were the most critical, any suggestions on how to proceed? |
|
The biggest problem is what I pointed out in #17051 (comment) |
|
Thanks for reviving this discussion and sorry it took me another couple days to circle back to it. |
cf57d84 to
fb29bda
Compare
|
The first problem is that implementing The second problem is that if you want to implement public test helpers then they need to be very polished or else we will just lock ourselves into a bad API. For example, there should be separate |
fb29bda to
817f7ad
Compare
Admittedly this isn't enough to resolve the doc build failure, so I'll need to revisit. But for now, since this isn't critical, let me remove this from the 7.0 milestone. Let's resolve #17189 first. Footnotes
|
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 4 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary. If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. If you believe I commented on this pull request incorrectly, please report this here. |
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 2 years. I plan to close this in a month if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary. If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. If you believe I commented on this pull request incorrectly, please report this here. |
Co-authored-by: Nathaniel Starkman <[email protected]>
817f7ad to
18684ea
Compare
Description
Follow up to #16080: this function is defined in 4 different modules with very little variation, and from local testing it seems possible to have a single source of truth for it. Exactly where that unified implementation should live is entierly up for debate. For now I just put it in a new and private module as a proof of concept.
Blocked by:
MixinColumntyping.Protocol#17189