TST: pytest 7.0.0, scipy 1.8.0 broke a few things#12823
Conversation
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
Another issue is that We should replace those with the solutions advised here: https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests |
|
Thanks, @saimn ! I'll get to that later today. |
For asdf @WilliamJamieson has fixed it in asdf-format/asdf#1075. |
|
In addition there is an RTD warning/failure due to moved paths (along with the h5py one): |
| header = hdul[1].header | ||
| with pytest.warns(None) as warning_list: | ||
| header["HIERARCH LONG KEYWORD"] = 42 | ||
| assert len(warning_list) == 0 |
There was a problem hiding this comment.
Unless this is emitting a warning that we are purposely ignoring in setup.cfg, we do not need a check.
There was a problem hiding this comment.
This probably comes from before the switch to use pytest's warning system. But given that the aim of this test is to test that no warning is emitted, it probably makes sense to check that explicitly ? Or at least add a comment explaining that if a warning is emitted this would fail the test.
| intersphinx_mapping['sphinx_automodapi'] = ('https://sphinx-automodapi.readthedocs.io/en/stable/', None) # noqa: F405, E501 | ||
| intersphinx_mapping['packagetemplate'] = ('https://docs.astropy.org/projects/package-template/en/latest/', None) # noqa: F405, E501 | ||
| intersphinx_mapping['h5py'] = ('http://docs.h5py.org/en/stable/', None) # noqa: F405 | ||
| intersphinx_mapping['h5py'] = ('https://docs.h5py.org/en/stable/', None) # noqa: F405 |
There was a problem hiding this comment.
For the record, the URL in sphinx-astropy is already correct.
|
Hrrmmm... looks like |
4fc1b79 to
7259526
Compare
This comment was marked as resolved.
This comment was marked as resolved.
f57db5b to
fc86e62
Compare
setup.cfg
Outdated
| jplephem | ||
| mpmath | ||
| asdf>=2.6 | ||
| asdf@git+https://github.com/asdf-format/asdf.git |
There was a problem hiding this comment.
Tests are only passing with this pin, so that means we either have to:
- Pin
pytest<7
OR
- Wait for
asdfto release and then bump minversion ofasdfto that release.
This pin broke RTD and linkcheck but that is okay because we will not merge with this pin anyway.
| jplephem | ||
| mpmath | ||
| asdf>=2.6 | ||
| asdf>=2.9.2 |
There was a problem hiding this comment.
Is this too controversial for backport, @nden , @WilliamJamieson , or @eslavich ?
There was a problem hiding this comment.
I don't think so, the worst thing someone would encounter upgrading from 2.6 --> 2.9.2 is a deprecation warning. We've been pretty good about staying true to semantic versioning.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
and replace it with warnings.catch_warnings() or pytest.warns(); the latter fails on zero warning. Bump pytest minversion to 7 because pytest.warns() is new there. Ignore pytest-asdf warning that is already fixed upstream.
cosmology/tests/test_funcs.py warnings changed.
|
@pllim The changes in |
adrn
left a comment
There was a problem hiding this comment.
Coordinates change looks fine, if it works!
|
I see a few PR merges are getting held up by CI failures. So let's get this in. If the rest of the subpackage maintainers not happy with the diff, they can open follow-up PRs. 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. |
|
@pllim - thanks so much for what turned out to be quite the task! (And all great for units) |
TST: pytest 7.0.0, scipy 1.8.0 broke a few things
…5.0.x Backport PR #12823 on branch v5.0.x (TST: pytest 7.0.0, scipy 1.8.0 broke a few things)
Using older versions of `pytest` is not possible since astropy/astropy#12823.
Using older versions of `pytest` is not possible since astropy#12823. Furthermore, `pytest-doctestplus` was made compatible with `pytest` 7.0 in scientific-python/pytest-doctestplus#171, so its minimum required version has to be updated too.
Using older versions of `pytest` is not possible since astropy#12823. Furthermore, `pytest-doctestplus` was made compatible with `pytest` 7.0 in scientific-python/pytest-doctestplus#171, so its minimum required version has to be updated too.
Description
This pull request is to fix some stuff that pytest 7.0.0 release broke.
Need new
asdfrelease:Out of scope:
Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
Extra CIlabel.no-changelog-entry-neededlabel. If this is a manual backport, use theskip-changelog-checkslabel unless special changelog handling is necessary.astropy-botcheck might be missing; do not let the green checkmark fool you.backport-X.Y.xlabel(s) before merge.