Skip to content
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: Set minimum required versions to NumPy 1.17+ and Python 3.7+ #1074

Merged
merged 20 commits into from
Mar 24, 2021

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Mar 18, 2021

Description of proposed changes

Start adopting NEP29 - Recommend Python and NumPy version support as a community policy standard, see https://numpy.org/neps/nep-0029-deprecation_policy.html. Also modifies the Github Actions CI test matrix to test only minimum (NumPy1.17/Python3.7) and maximum (NumPy1.20/Python3.9) versions only.

Bumps minimum supported NumPy version to 1.17 in the setup.py, requirements.txt and environment.yml files. Also set minimum required Python version to be 3.7+.

Note: Will also need to modify the conda-forge pygmt-feedstock recipe to set these minimum required versions, specifically at https://github.com/conda-forge/pygmt-feedstock/blob/823be1f1bf96e6a33725ef7d9c016a0da645b1a9/recipe/meta.yaml#L27-L30

TODO also:

Fixes #690

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

Start adopting NEP29 - Recommend Python and NumPy
version support as a community policy standard, see
https://numpy.org/neps/nep-0029-deprecation_policy.html.
Bumps minimum supported NumPy version to 1.17 in the
setup.py, requirements.txt and environment.yml files. Also
set minimum required Python version to be 3.7+.
@weiji14 weiji14 added the deprecation Deprecating a feature label Mar 18, 2021
@weiji14 weiji14 added this to the 0.4.0 milestone Mar 18, 2021
Test only on minimum and maximum supported versions
according to NEP. I.e. minimum of NumPy 1.17 and Py3.7,
maximum of NumPy 1.20 and Py3.9. This drops testing on
the middle Python 3.8 version to conserve CI resources.
Comment on lines +151 to +153
In `setup.py`, the `python_requires` variable should be set to the minimum
supported version of Python. Minimum Python and NumPy version support should be
adjusted upward on every major and minor release, but never on a patch release.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add the line "All supported minor versions of Python should be in the test matrix and have binary artifacts built for the release." as in https://numpy.org/neps/nep-0029-deprecation_policy#implementation because:

  1. We're not testing the middle Python version (Python 3.8)
  2. We're using no-arch builds on conda-forge and a single PyGMT Python 3 wheel on PyPI, instead of having specific binary artifacts for each Python version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

Comment on lines +232 to +238
Compatibility with GMT and Python/NumPy versions
------------------------------------------------

======= ========== =========
PyGMT GMT Python
======= ========== =========
======= ========== ========= =========
PyGMT GMT Python NumPy
======= ========== ========= =========
0.4.x >=6.2.0 >=3.7 >=1.17.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a good idea to add this here now, or should we do it during the v0.4.0 release process instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add it when we release v0.4.0, but I'm afraid we may forget it during the release process. I think it's fine to add this here.

Comment on lines +232 to +238
Compatibility with GMT and Python/NumPy versions
------------------------------------------------

======= ========== =========
PyGMT GMT Python
======= ========== =========
======= ========== ========= =========
PyGMT GMT Python NumPy
======= ========== ========= =========
0.4.x >=6.2.0 >=3.7 >=1.17.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add it when we release v0.4.0, but I'm afraid we may forget it during the release process. I think it's fine to add this here.

MAINTENANCE.md Outdated Show resolved Hide resolved
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Mar 23, 2021
@weiji14 weiji14 self-assigned this Mar 24, 2021
@weiji14 weiji14 merged commit 955a55e into master Mar 24, 2021
@weiji14 weiji14 deleted the adopt_nep29 branch March 24, 2021 21:14
@weiji14 weiji14 removed the final review call This PR requires final review and approval from a second reviewer label Mar 24, 2021
@weiji14
Copy link
Member Author

weiji14 commented Mar 24, 2021

  • Change branch protection rules to use the NumPy version specifc tests (e.g. 'ubuntu-latest - Python 3.7 / NumPy 1.17 ')

Ok, I've updated the branch protection rules so our test matrix now has 6 instead of 9 tests. Hopefully this decreases the chances of those random Windows failures!

image

weiji14 added a commit to regro-cf-autotick-bot/pygmt-feedstock that referenced this pull request Jun 21, 2021
Follow NEP29 (xref GenericMappingTools/pygmt#1074), setting minimum required versions to NumPy 1.17+ and Python 3.7+. Also set minimum of GMT 6.2.0 as per GenericMappingTools/pygmt#1321.
weiji14 added a commit to conda-forge/pygmt-feedstock that referenced this pull request Jun 21, 2021
* updated v0.4.0

* MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.10.3, and conda-forge-pinning 2021.06.21.02.43.59

* Pin minimum required dependency versions

Follow NEP29 (xref GenericMappingTools/pygmt#1074), setting minimum required versions to NumPy 1.17+ and Python 3.7+. Also set minimum of GMT 6.2.0 as per GenericMappingTools/pygmt#1321.

Co-authored-by: Wei Ji <[email protected]>
@weiji14 weiji14 mentioned this pull request Jun 23, 2021
5 tasks
@weiji14 weiji14 mentioned this pull request Jan 13, 2022
6 tasks
@seisman seisman mentioned this pull request Dec 20, 2022
7 tasks
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…enericMappingTools#1074)

Start adopting NEP29 - Recommend Python and NumPy
version support as a community policy standard, see
https://numpy.org/neps/nep-0029-deprecation_policy.html.
Bumps minimum supported NumPy version to 1.17 in the
setup.py, requirements.txt and environment.yml files. Also
set minimum required Python version to be 3.7+.

* Modify CI test matrix to test on Numpy 1.17 and 1.20, Python 3.7 and 3.9

Test only on minimum and maximum supported versions
according to NEP. I.e. minimum of NumPy 1.17 and Py3.7,
maximum of NumPy 1.20 and Py3.9. This drops testing on
the middle Python 3.8 version to conserve CI resources.

* Add NumPy version to codecov reporting
* Update website links of PyGMT deps to use https and official sources
* Update MAINTENANCE.md to mention two Linux CI jobs are run in draft PRs
* Place NEP29 dependencies policy in MAINTENANCE.md
* List NumPy in compatibility version list on main README.rst page
@seisman seisman mentioned this pull request Sep 17, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecating a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt NEP29 - drop support for Python 3.6 and NumPy 1.16
2 participants