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 |
|
Just making sure this is not going to break all the optional jobs... 😬 |
|
Benchmark and linkcheck failures are unrelated. They ran, so that's what matters. |
eerovaher
left a comment
There was a problem hiding this comment.
This is another example of how maintaining separate lists of oldest supported dependencies both in pyproject.toml and in tox.ini is highly error-prone and causes our tests meant to use the oldest versions to often use latest versions instead. Updating tox.ini manually is better than doing nothing, but ideally we should come up with a better solution that would not require such manual updates. The uv --resolution=lowest strategy looks like just what we need for the oldest dependencies tests.
| for name in dimensionless_to_dimensionless_sps_ufuncs: | ||
| # In SCIPY_LT_1_5, erfinv and erfcinv are not ufuncs. | ||
| ufunc = getattr(sps, name, None) | ||
| if isinstance(ufunc, np.ufunc): |
There was a problem hiding this comment.
@mhvk, do you know if we still need the isinstance(ufunc, np.ufunc) check? And related to that, is the following still needed?
astropy/astropy/units/tests/test_quantity_ufuncs.py
Lines 1527 to 1530 in e65f975
There was a problem hiding this comment.
No, we don't -- thanks for catching that. More generally, I really should not have introduced those kinds of checks... Much better just to use version numbers as those can be found much more easily.
There was a problem hiding this comment.
I pushed another commit with what I think you wanted. Please re-review. Thanks!
| # The oldestdeps factor is intended to be used to install the oldest versions of all | ||
| # dependencies that have a minimum version. | ||
| oldestdeps: pyerfa==2.0.* | ||
| oldestdeps: pyerfa==2.0.1.1 |
There was a problem hiding this comment.
Why is the oldest version specified in such detail for erfa, but not for the other dependencies?
There was a problem hiding this comment.
pyerfa doesn't really follow semver.
| oldestdeps: pyerfa==2.0.1.1 | ||
| oldestdeps: numpy==1.23.* | ||
| oldestdeps: matplotlib==3.3.* | ||
| oldestdeps: matplotlib==3.6.* |
There was a problem hiding this comment.
I just checked the logs and saw that our oldest dependencies tests have indeed been using the latest matplotlib, but this change fixes it.
I do not disagree but refactoring that infrastructure is out of scope here. |
mhvk
left a comment
There was a problem hiding this comment.
This looks good, thanks @pllim! Would be great to also make the fixes suggested by @eerovaher in units, but also fine to do that after.
| ] | ||
|
|
||
| MATPLOTLIB_LT_3_8 = not minversion(mpl, "3.8.dev") | ||
| MATPLOTLIB_LT_3_8 = not minversion(mpl, "3.8") |
There was a problem hiding this comment.
Fine not to do it in this PR, but I wonder if it would be better to centralize these kinds of limits - that way one can grep and replace whenever a minimum version is increased.
There was a problem hiding this comment.
Kinda tricky for optional dependencies because if we put it too high up, we risk import error on minimal dependencies.
|
Thanks for the reviews. Failures still unrelated. Merging! |
| from astropy.utils.compat import NUMPY_LT_2_0 | ||
| from astropy.utils.compat.optional_deps import HAS_PLT | ||
| from astropy.utils.masked import Masked, MaskedNDArray | ||
| from astropy.visualization.wcsaxes.utils import MATPLOTLIB_LT_3_8 |
There was a problem hiding this comment.
Oops, this caused a problem: now the astropy.utils.masked tests get skipped if one does not have matplotlib installed... I'll make a fix...
There was a problem hiding this comment.
Ugh. Sorry for the oversight. I merged your fix. Thanks!
Description
This pull request is to wrap up #16023 but given all the conflicts over there, I don't feel like clobbering Mridul's work so I open a new PR with my vision of how to resolve it based on past conversations.