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

Migrate from NEP 029 to SPEC 0 #2863

Closed
seisman opened this issue Dec 8, 2023 · 7 comments · Fixed by #3043
Closed

Migrate from NEP 029 to SPEC 0 #2863

seisman opened this issue Dec 8, 2023 · 7 comments · Fixed by #3043
Labels
maintenance Boring but important stuff for the core devs
Milestone

Comments

@seisman
Copy link
Member

seisman commented Dec 8, 2023

The NEP 029 page has a note says:

This NEP is superseded by the scientific python ecosystem coordination guideline SPEC 0 — Minimum Supported Versions.

I haven't read SPEC 0 carefully, but I think we should migrate from NEP 029 to SPEC 0.

@seisman seisman added the maintenance Boring but important stuff for the core devs label Dec 8, 2023
@seisman
Copy link
Member Author

seisman commented Dec 10, 2023

OK, reading more about NEP 29 and SPEC 0.

Here is what NEP 29 recommends:

When a project releases a new major or minor version, we recommend that they support at least all minor versions of Python introduced and released in the prior 42 months from the anticipated release date with a minimum of 2 minor versions of Python, and all minor versions of NumPy released in the prior 24 months from the anticipated release date with a minimum of 3 minor versions of NumPy.

Here is what SPEC 0 recommends:

Specifically, we recommend that:

  1. Support for Python versions be dropped 3 years after their initial release.
  2. Support for core package dependencies be dropped 2 years after their initial release.

They're similar but with some differences:

  1. 42 months vs 36 months support for Python versions
  2. SPEC 0 is applied to all core package dependencies while NEP 29 is only applied to NumPy.

If we follow SPEC 0, then currently the minimum supported versions will be:

  1. Python>=3.10 (NEP 29 recommends Python>=3.9)
  2. NumPy>=1.22.0
  3. pandas>=1.4.0
  4. xarray>=0.21.0

@weiji14
Copy link
Member

weiji14 commented Dec 10, 2023

Python>=3.10 (NEP 29 recommends Python>=3.9)

Looking at the PyPI download stats at https://pypistats.org/packages/pygmt, it seems like Python 3.9 usage is hovering at about 10-30% in the past 3 months, so not an insignificant fraction. Python 3.10 does seem to be the highest at >50% usually.

image

pandas>=1.4.0

We're going to pin to pandas>=1.2.0 as discussed at #2729 (comment) to ease the implementation of GMT_DATASET. I can also see this more aggressive pin being helpful for #2800, as we'll drop pandas=1.5.x on or after 2024-09-18, and using pandas>=2.0 would ease some implementations of the Arrow integration.

Otherwise, no strong opinions on moving to SPEC 0, and if most of us agree, we can probably move on to implementing the minimum pins. That said, I would maybe suggest that we delay implementation of this to PyGMT v0.12.0, to have a bit of a transition period?

@seisman
Copy link
Member Author

seisman commented Dec 11, 2023

That said, I would maybe suggest that we delay implementation of this to PyGMT v0.12.0, to have a bit of a transition period?

Sounds reasonable.

@seisman
Copy link
Member Author

seisman commented Jan 14, 2024

Here are a few points in my mind:

@weiji14
Copy link
Member

weiji14 commented Feb 5, 2024

IPython is also listed at https://scientific-python.org/specs/spec-0000/, and is marked as an optional dependency of PyGMT here:

"ipython",

Do we need to pin to a minimum version of IPython too? If so, we should be on ipython>=8.0.0 as of early Feb 2024.

@seisman
Copy link
Member Author

seisman commented Feb 5, 2024

IPython is also listed at https://scientific-python.org/specs/spec-0000/, and is marked as an optional dependency of PyGMT here:

"ipython",

Do we need to pin to a minimum version of IPython too? If so, we should be on ipython>=8.0.0 as of early Feb 2024.

I prefer not to pin IPython since it's not heavily used by PyGMT.

seisman added a commit that referenced this issue Feb 5, 2024
Following [SPEC 0](https://scientific-python.org/specs/spec-0000/) policy where
Python 3.9 should be dropped in 2023 quarter 4.

Supersedes PR #2487.

Address #2863.
@weiji14
Copy link
Member

weiji14 commented Feb 5, 2024

I prefer not to pin IPython since it's not heavily used by PyGMT.

Ok let's go with not pinning IPython then, less work having to update the minimum pin every release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants