-
Notifications
You must be signed in to change notification settings - Fork 224
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
NEP29: Test PyGMT on NumPy 1.23 and 1.21 #2057
Conversation
Bumps [numpy](https://github.com/numpy/numpy) from 1.22.4 to 1.23.2. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/v1.23.0/doc/changelog/1.23.0-changelog.rst) - [Commits](numpy/numpy@v1.22.4...v1.23.2)
.github/workflows/ci_tests.yaml
Outdated
# Pair Python 3.8 with NumPy 1.20 and Python 3.10 with NumPy 1.22 | ||
# Only install optional packages on Python 3.10/NumPy 1.22 | ||
# Pair Python 3.8 with NumPy 1.20 and Python 3.10 with NumPy 1.23 | ||
# Only install optional packages on Python 3.10/NumPy 1.23 | ||
include: | ||
- python-version: '3.8' | ||
numpy-version: '1.20' |
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.
Question. Do we want to just set our minimum tested NumPy version to 1.21 in the CI since xarray
doesn't work with Numpy 1.20 and they won't be releasing a patch as per pydata/xarray#6818 (comment)? Due date to drop Numpy 1.20 is Jan 31, 2023 (5 months) per https://numpy.org/neps/nep-0029-deprecation_policy.html#drop-schedule.
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 think setting numpy to v1.21 makes sense. I'm not sure what the plan is for the pygmt v0.8 release, but I don't think we'll have 2 releases before January 2023, so our next release should be up to date on minimum versions.
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.
Cool. Just to be clear, the suggestion is to just set NumPy 1.21 for the Continuous Integration (CI) so that the unit tests pass. We shouldn't change the minimum supported NumPy mentioned in https://github.com/GenericMappingTools/pygmt/tree/v0.7.0#compatibility-with-gmtpythonnumpy-versions until after Jan 2023 (though users using NumPy 1.20 will need to figure out the xarray
dependency themselves).
Bypass issue with `TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class` reported in pydata/xarray#6818.
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.
The two failing tests on Windows are unrelated to this PR and should be addressed separately.
* NEP29: Test PyGMT on NumPy 1.23 Bumps [numpy](https://github.com/numpy/numpy) from 1.22.4 to 1.23.2. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/v1.23.0/doc/changelog/1.23.0-changelog.rst) - [Commits](numpy/numpy@v1.22.4...v1.23.2) * Set minimum NumPy version to 1.21 for CI tests Bypass issue with `TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class` reported in pydata/xarray#6818.
Description of proposed changes
Bumps numpy from 1.22.4 to 1.23.2. NumPy 1.23.0 was released on 22 Jun 2022.
This is in line with PyGMT's policy on NEP29 at https://www.pygmt.org/v0.7.0/maintenance.html#dependencies-policy, xref #1074.
Also setting minimum NumPy version on CI to 1.21, to bypass the
TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class
problem with NumPy 1.20 andxarray==2022.6.0
so that unit tests pass. See also pydata/xarray#6818Note that the branch protection rules at https://github.com/GenericMappingTools/pygmt/settings/branches will need to be changed to use Python 3.10/Numpy 1.22 instead of Python 3.10/Numpy 1.23 before this Pull Request is merged.
Supersedes #1701
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version