Repository navigation
TST: simplify jplephem test case for newer versions - #18331
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 |
|
Failure is unrelated. It's still blocking since the failing job is required for merging, but I'll undraft this any way since there's nothing more to be done here. |
|
I just pushed a temporary patch to pin scipy on windows, working around #18333. Despite the fact that resolving orthogonal issues in a single PR isn't ideal, it's still the easiest (and to me, only) option available to unblock everything since both issues are mutually blocking: we need to fix both to re-enable PR merging. |
|
4c0fe8e to
4567384
Compare
4567384 to
52150f9
Compare
|
|
||
| return wrapped | ||
| else: | ||
| # jplephem<=2.23 leaves the file open (a ResourceWarning is emitted) |
There was a problem hiding this comment.
| # jplephem<=2.23 leaves the file open (a ResourceWarning is emitted) | |
| # jplephem<=2.22 leaves the file open (a ResourceWarning is emitted) |
or
| # jplephem<=2.23 leaves the file open (a ResourceWarning is emitted) | |
| # jplephem<2.23 leaves the file open (a ResourceWarning is emitted) |
| filterwarnings = pytest.mark.filterwarnings("ignore", category=ResourceWarning) | ||
|
|
||
|
|
||
| @filterwarnings |
There was a problem hiding this comment.
| @filterwarnings | |
| @pytest.mark.filterwarnings("error" if minversion("jplephem", "2.23") else "ignore", category=ResourceWarning) |
There was a problem hiding this comment.
oh, that's much better, thanks !
… CI-breaking change in v1.16.0
52150f9 to
0c2eaad
Compare
eerovaher
left a comment
There was a problem hiding this comment.
I can approve the changes to coordinates. I can't help with Windows-specific problems, but pinning scipy on Windows seems like a sensible temporary solution to unblock CI.
|
@pllim, can you weigh in on the second commit ? |
|
It is in my queue but given that I am running the coordination meeting, not sure when I can get to this. Is this urgent? |
|
Kinda, it's about unblocking CI for every other PR |
| # To fix this issue, an upstream fix is required in jplephem | ||
| # package. | ||
| with pytest.warns(ResourceWarning), pytest.raises(ValueError, match="^file starts"): | ||
| with pytest.raises(ValueError, match="^file starts"): |
There was a problem hiding this comment.
I would have done the version check inside the test function; keep the existing pytest.warns for not minversion("jplephem", "2.23") but nullcontext otherwise.
There was a problem hiding this comment.
that is exactly what I did originally. What you're seeing now is after @eerovaher's review
There was a problem hiding this comment.
pytest.warns suggests that the ResourceWarning is something that we want to occur, which is not the case. The warning is instead a nuisance caused by a known bug in a dependency that has been finally fixed, and as such should be explicitly ignored with filterwarnings. The fact that pytest.warns also prevents warnings from causing failures in our tests is a side-effect.
| # Recommended run-time dependencies to enable a lot of functionality within Astropy. | ||
| recommended = [ | ||
| "scipy>=1.9.2", | ||
| "scipy<1.16 ; platform_system=='Windows'", # temp, https://github.com/astropy/astropy/issues/18333 |
There was a problem hiding this comment.
Can we address this as separate PR? I haven't had a chance to look at the logs yet and maybe we don't need this after all.
There was a problem hiding this comment.
unfortunately I don't think we can, unless you're able to override CI requirements, because both issues are separately breaking the Windows job, which is required.
pllim
left a comment
There was a problem hiding this comment.
To unblock things, let's merge. But I want to revisit the Windows one. Thanks!
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
|
@neutrinoceros are you able to do manual backport? Thanks! 🙏 |
…test case for newer versions) TST: simplify `jplephem` test case for newer versions
|
manual backport at #18335 |
…test case for newer versions) TST: simplify `jplephem` test case for newer versions
|
Thanks! |
Backport PR #18331 on branch v7.1.x (TST: simplify `jplephem` test case for newer versions)
Description
This test failed on weekly cron, presumably because
jplephem0.23 just came out (hard to be certain without a changelog)