From 78c3d2a28ecfcbc4926a61ff81fd8e71a98e520f Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 13:47:27 +1300 Subject: [PATCH 01/17] NEP29: Set minimum required versions to NumPy 1.17+ and Python 3.7+ 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+. --- environment.yml | 2 +- requirements.txt | 2 +- setup.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/environment.yml b/environment.yml index caccb437f6e..121b4432653 100644 --- a/environment.yml +++ b/environment.yml @@ -6,7 +6,7 @@ dependencies: # Required dependencies - pip - gmt=6.1.1 - - numpy + - numpy>=1.17 - pandas - xarray - netCDF4 diff --git a/requirements.txt b/requirements.txt index ffdf6724f8e..8f5a7863bf8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Required packages -numpy +numpy>=1.17 pandas xarray netCDF4 diff --git a/setup.py b/setup.py index 45685e36ada..aacf552047a 100644 --- a/setup.py +++ b/setup.py @@ -30,10 +30,11 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", - "License :: OSI Approved :: {}".format(LICENSE), + f"License :: OSI Approved :: {LICENSE}", ] PLATFORMS = "Any" -INSTALL_REQUIRES = ["numpy", "pandas", "xarray", "netCDF4", "packaging"] +PYTHON_REQUIRES = ">=3.7" +INSTALL_REQUIRES = ["numpy>=1.17", "pandas", "xarray", "netCDF4", "packaging"] # Configuration for setuptools-scm SETUP_REQUIRES = ["setuptools_scm"] USE_SCM_VERSION = {"local_scheme": "node-and-date", "fallback_version": "unknown"} @@ -57,6 +58,7 @@ package_data=PACKAGE_DATA, classifiers=CLASSIFIERS, keywords=KEYWORDS, + python_requires=PYTHON_REQUIRES, install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, ) From 9e641c29ac48a000ba7b4985665642cc326103a9 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 13:57:58 +1300 Subject: [PATCH 02/17] 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. --- .github/workflows/ci_tests.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 7affe1cb2a6..cc17dc58297 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -30,7 +30,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + numpy-version: ['1.17', '1.20'] + python-version: [3.7, 3.9] os: [ubuntu-latest, macOS-latest, windows-latest] # Is it a draft Pull Request (true or false)? isDraft: @@ -44,9 +45,6 @@ jobs: - os: ubuntu-latest python-version: 3.7 isDraft: true - - os: ubuntu-latest - python-version: 3.8 - isDraft: true defaults: run: shell: bash -l {0} @@ -82,7 +80,8 @@ jobs: # Install GMT and other required dependencies from conda-forge - name: Install dependencies run: | - conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ + conda install gmt=6.1.1 numpy=${{ matrix.numpy-version }} pandas \ + xarray netCDF4 packaging \ codecov coverage[toml] ipython make \ pytest-cov pytest-mpl pytest>=6.0 \ sphinx-gallery From fcb6bad3c9d195b1952bfd1f0aa037b36ac3fefa Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 14:25:00 +1300 Subject: [PATCH 03/17] Setup test matrix combinations (OS/Python/NumPy) explicitly --- .github/workflows/ci_tests.yaml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index cc17dc58297..abaad9bcecb 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -30,9 +30,27 @@ jobs: strategy: fail-fast: false matrix: - numpy-version: ['1.17', '1.20'] - python-version: [3.7, 3.9] - os: [ubuntu-latest, macOS-latest, windows-latest] + include: + # Minimum NEP29 versions + - os: ubuntu-latest + python-version: '3.7' + numpy-version: '1.17' + - os: macOS-latest + python-version: '3.7' + numpy-version: '1.17' + - os: windows-latest + python-version: '3.7' + numpy-version: '1.17' + # Maximum NEP29 versions + - os: ubuntu-latest + python-version: '3.9' + numpy-version: '1.20' + - os: macOS-latest + python-version: '3.9' + numpy-version: '1.20' + - os: windows-latest + python-version: '3.9' + numpy-version: '1.20' # Is it a draft Pull Request (true or false)? isDraft: - ${{ github.event.pull_request.draft }} @@ -42,9 +60,9 @@ jobs: isDraft: true - os: windows-latest isDraft: true - - os: ubuntu-latest - python-version: 3.7 - isDraft: true + # - os: ubuntu-latest + # python-version: 3.7 + # isDraft: true defaults: run: shell: bash -l {0} From 5919ef8e2e3d39da7d7fa601f9d7de0dc15ab2d8 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 14:47:50 +1300 Subject: [PATCH 04/17] Try alternative way of excluding certain matrix builds during draft PR --- .github/workflows/ci_tests.yaml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index abaad9bcecb..44c668d5c30 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -30,6 +30,10 @@ jobs: strategy: fail-fast: false matrix: + # Is it a draft Pull Request (true or false)? + isDraft: + - ${{ github.event.pull_request.draft }} + # Only run one job (Ubuntu + Python 3.9) for draft PRs include: # Minimum NEP29 versions - os: ubuntu-latest @@ -38,9 +42,11 @@ jobs: - os: macOS-latest python-version: '3.7' numpy-version: '1.17' + isDraft: false - os: windows-latest python-version: '3.7' numpy-version: '1.17' + isDraft: false # Maximum NEP29 versions - os: ubuntu-latest python-version: '3.9' @@ -48,21 +54,11 @@ jobs: - os: macOS-latest python-version: '3.9' numpy-version: '1.20' + isDraft: false - os: windows-latest python-version: '3.9' numpy-version: '1.20' - # Is it a draft Pull Request (true or false)? - isDraft: - - ${{ github.event.pull_request.draft }} - # Only run one job (Ubuntu + Python 3.9) for draft PRs - exclude: - - os: macOS-latest - isDraft: true - - os: windows-latest - isDraft: true - # - os: ubuntu-latest - # python-version: 3.7 - # isDraft: true + isDraft: false defaults: run: shell: bash -l {0} From 06b0022646dbe27960f8ba7a5c30134cba7eb48f Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 14:52:45 +1300 Subject: [PATCH 05/17] Include NumPy version in matrix build name --- .github/workflows/ci_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 44c668d5c30..8e65bb7aa80 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -25,7 +25,7 @@ on: jobs: test: - name: ${{ matrix.os }} - Python ${{ matrix.python-version }} + name: ${{ matrix.os }} - Python ${{ matrix.python-version }}/NumPy ${{ matrix.numpy-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false From 1205006f1654cda17cf9fe07117764f035483b79 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 15:03:28 +1300 Subject: [PATCH 06/17] Try add isDraft variable to ubuntu-latest matrix builds too --- .github/workflows/ci_tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 8e65bb7aa80..08dec8cc9cb 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -39,6 +39,7 @@ jobs: - os: ubuntu-latest python-version: '3.7' numpy-version: '1.17' + isDraft: true - os: macOS-latest python-version: '3.7' numpy-version: '1.17' @@ -51,6 +52,7 @@ jobs: - os: ubuntu-latest python-version: '3.9' numpy-version: '1.20' + isDraft: true - os: macOS-latest python-version: '3.9' numpy-version: '1.20' From 2d293bbe75823018e093548c4bd687793fd65da2 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 15:24:25 +1300 Subject: [PATCH 07/17] Fancy ternary operator to pair Py3.7 with NumPy1.17 & Py3.9 with NumPy1.20 --- .github/workflows/ci_tests.yaml | 37 ++++++++++----------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 08dec8cc9cb..cce2b5ade57 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -25,42 +25,25 @@ on: jobs: test: - name: ${{ matrix.os }} - Python ${{ matrix.python-version }}/NumPy ${{ matrix.numpy-version }} + name: ${{ matrix.os }} - Python ${{ matrix.python-version }}/NumPy ${{ env.NUMPY-VERSION }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + python-version: [3.7, 3.9] + os: [ubuntu-latest, macOS-latest, windows-latest] # Is it a draft Pull Request (true or false)? isDraft: - ${{ github.event.pull_request.draft }} # Only run one job (Ubuntu + Python 3.9) for draft PRs - include: - # Minimum NEP29 versions - - os: ubuntu-latest - python-version: '3.7' - numpy-version: '1.17' - isDraft: true + exclude: - os: macOS-latest - python-version: '3.7' - numpy-version: '1.17' - isDraft: false + isDraft: true - os: windows-latest - python-version: '3.7' - numpy-version: '1.17' - isDraft: false - # Maximum NEP29 versions + isDraft: true - os: ubuntu-latest - python-version: '3.9' - numpy-version: '1.20' + python-version: 3.7 isDraft: true - - os: macOS-latest - python-version: '3.9' - numpy-version: '1.20' - isDraft: false - - os: windows-latest - python-version: '3.9' - numpy-version: '1.20' - isDraft: false defaults: run: shell: bash -l {0} @@ -69,6 +52,8 @@ jobs: env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} + # Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.20 + NUMPY-VERSION: ${{ matrix.python-version == '3.7' && '1.17' || '1.20' }} steps: # Cancel previous runs that are not completed @@ -96,8 +81,8 @@ jobs: # Install GMT and other required dependencies from conda-forge - name: Install dependencies run: | - conda install gmt=6.1.1 numpy=${{ matrix.numpy-version }} pandas \ - xarray netCDF4 packaging \ + conda install gmt=6.1.1 numpy=${{ env.NUMPY-VERSION }} \ + pandas xarray netCDF4 packaging \ codecov coverage[toml] ipython make \ pytest-cov pytest-mpl pytest>=6.0 \ sphinx-gallery From dd8863dd2062d6b8952f5012f5d8ed405aa2fd43 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 15:49:07 +1300 Subject: [PATCH 08/17] Use a less fancy way of setting min/max NEP29 versions for Python/NumPy --- .github/workflows/ci_tests.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index cce2b5ade57..74249f495bd 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -25,7 +25,7 @@ on: jobs: test: - name: ${{ matrix.os }} - Python ${{ matrix.python-version }}/NumPy ${{ env.NUMPY-VERSION }} + name: ${{ matrix.os }} - Python ${{ matrix.python-version }} / NumPy ${{ matrix.numpy-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -41,9 +41,15 @@ jobs: isDraft: true - os: windows-latest isDraft: true - - os: ubuntu-latest - python-version: 3.7 - isDraft: true + # - os: ubuntu-latest + # python-version: 3.7 + # isDraft: true + include: + # Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.20 + - python-version: 3.7 + numpy-version: '1.17' + - python-version: 3.9 + numpy-version: '1.20' defaults: run: shell: bash -l {0} @@ -52,8 +58,6 @@ jobs: env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} - # Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.20 - NUMPY-VERSION: ${{ matrix.python-version == '3.7' && '1.17' || '1.20' }} steps: # Cancel previous runs that are not completed @@ -81,7 +85,7 @@ jobs: # Install GMT and other required dependencies from conda-forge - name: Install dependencies run: | - conda install gmt=6.1.1 numpy=${{ env.NUMPY-VERSION }} \ + conda install gmt=6.1.1 numpy=${{ matrix.numpy-version }} \ pandas xarray netCDF4 packaging \ codecov coverage[toml] ipython make \ pytest-cov pytest-mpl pytest>=6.0 \ From a8355b55722aea6820a09cf7ce57e3ecaf401424 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 16:28:02 +1300 Subject: [PATCH 09/17] Add NumPy version to codecov reporting and disable Linux py3.7 on draft --- .github/workflows/ci_tests.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 74249f495bd..7166342add9 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -41,11 +41,11 @@ jobs: isDraft: true - os: windows-latest isDraft: true - # - os: ubuntu-latest - # python-version: 3.7 - # isDraft: true + - os: ubuntu-latest + python-version: 3.7 + isDraft: true + # Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.20 include: - # Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.20 - python-version: 3.7 numpy-version: '1.17' - python-version: 3.9 @@ -54,10 +54,11 @@ jobs: run: shell: bash -l {0} - # environmental variables used in coverage + # Environment variables used by codecov env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} + NUMPY: ${{ matrix.numpy-version }} steps: # Cancel previous runs that are not completed @@ -136,5 +137,5 @@ jobs: uses: codecov/codecov-action@v1.2.2 with: file: ./coverage.xml # optional - env_vars: OS,PYTHON + env_vars: OS,PYTHON,NUMPY fail_ci_if_error: false From 20d83c2849352f093b8f5e5111b6ce67f2bfb2bb Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 18 Mar 2021 17:38:59 +1300 Subject: [PATCH 10/17] Try fix error when evaluating 'runs-on' for job 'test' in Github Actions --- .github/workflows/ci_tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index a5c26e286a2..b843210d0bd 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -41,9 +41,9 @@ jobs: isDraft: true - os: windows-latest isDraft: true - - os: ubuntu-latest - python-version: 3.7 - isDraft: true + # - os: ubuntu-latest + # python-version: 3.7 + # isDraft: true # Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.20 include: - python-version: 3.7 From 5239c7a24d1a40b57f48fe26bab07f1d1800f381 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Sun, 21 Mar 2021 10:54:36 +1300 Subject: [PATCH 11/17] Update website links of PyGMT deps to use https and official sources --- doc/install.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/install.rst b/doc/install.rst index 83587515034..f0c6fe5d807 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -79,18 +79,17 @@ We recommend following the instructions further on to install GMT 6. Dependencies ------------ -PyGMT requires the following libraries: +PyGMT requires the following libraries to be installed: -* `numpy `__ -* `pandas `__ -* `xarray `__ -* `netCDF4 `__ -* `packaging `__ +* `numpy `__ +* `pandas `__ +* `xarray `__ +* `netCDF4 `__ +* `packaging `__ The following are optional (but recommended) dependencies: -* `IPython `__: For embedding the figures in Jupyter - notebooks. +* `IPython `__: For embedding the figures in Jupyter notebooks. Installing GMT and other dependencies From 5e903af18a31e426f15c943c091846b1a154041f Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Sun, 21 Mar 2021 11:00:51 +1300 Subject: [PATCH 12/17] Add NEP29 policy language to installation page --- doc/install.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/install.rst b/doc/install.rst index f0c6fe5d807..6489fd54926 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -46,15 +46,13 @@ Start by looking at the tutorials on our sidebar, good luck! Which Python? ------------- -PyGMT is tested to run on **Python 3.7 or greater**. Older Python versions may -work, but there is no guarantee that PyGMT will behave as expected. +PyGMT is tested to run on **Python 3.7 or greater**. We recommend using the `Anaconda `__ Python distribution to ensure you have all dependencies installed and the `conda `__ -package manager is available. Installing Anaconda does not require administrative -rights to your computer and doesn't interfere with any other Python -installations on your system. +package manager is available. Installing Anaconda does not require administrative rights +to your computer and won't interfere with any other Python installations on your system. Which GMT? @@ -91,6 +89,14 @@ The following are optional (but recommended) dependencies: * `IPython `__: For embedding the figures in Jupyter notebooks. +Note that PyGMT has adopted +`NEP29 `__ alongside the rest +of the Scientific Python ecosystem, and therefore supports: + +* All minor versions of Python released 42 months prior to the project, + and at minimum the two latest minor versions. +* All minor versions of NumPy released in the 24 months prior to the project, + and at minimum the last three minor versions. Installing GMT and other dependencies ------------------------------------- From ed32c5b271bc46db643127a00ec560f43ab917a2 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 23 Mar 2021 10:37:46 +1300 Subject: [PATCH 13/17] Revert changes to line wrapping --- doc/install.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/install.rst b/doc/install.rst index 6489fd54926..045a07a2420 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -51,8 +51,9 @@ PyGMT is tested to run on **Python 3.7 or greater**. We recommend using the `Anaconda `__ Python distribution to ensure you have all dependencies installed and the `conda `__ -package manager is available. Installing Anaconda does not require administrative rights -to your computer and won't interfere with any other Python installations on your system. +package manager is available. Installing Anaconda does not require administrative +rights to your computer and doesn't interfere with any other Python +installations on your system. Which GMT? From 2510e563547ee5a8cb415b43efed1609128a0b5d Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 23 Mar 2021 16:18:49 +1300 Subject: [PATCH 14/17] Update MAINTENANCE.md to mention two Linux CI jobs are run in draft PRs --- MAINTENANCE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index 9ccd9f4779b..63f797d44cf 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -77,8 +77,9 @@ There are 9 configuration files located in `.github/workflows`: This is run on every commit to the *master* and Pull Request branches. It is also scheduled to run daily on the *master* branch. - In draft Pull Requests, only one job (Linux + Python latest) - is triggered to save on Continuous Integration resources. + In draft Pull Requests, only two jobs on Linux (Python 3.7 / NumPy 1.17 and + Python 3.9/ NumPy 1.20) are triggered to save on Continuous Integration + resources. 3. `ci_docs.yml` (Build documentation on Linux/macOS/Windows) From 5db0bfc7711e98f5f42f36bb9dc60fec8dd156c7 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 23 Mar 2021 16:55:54 +1300 Subject: [PATCH 15/17] Place NEP29 dependencies policy in MAINTENANCE.md --- MAINTENANCE.md | 17 +++++++++++++++++ doc/install.rst | 11 +---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index 63f797d44cf..1019090d316 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -12,6 +12,7 @@ If you want to make a contribution to the project, see the * [Reviewing and Merging Pull Requests](#reviewing-and-merging-pull-requests) * [Continuous Integration](#continuous-integration) * [Continuous Documentation](#continuous-documentation) +* [Dependencies Policy](#dependencies-policy) * [Making a Release](#making-a-release) - [Updating the Changelog](#updating-the-changelog) - [Check the README Syntax](#check-the-readme-syntax) @@ -136,6 +137,22 @@ The actual script `package.json` is used by Vercel to install the necessary pack build the documentation, copy the files to a 'public' folder and deploy that to the web, see https://vercel.com/docs/build-step. + +## Dependencies Policy + +PyGMT has adopted [NEP29](https://numpy.org/neps/nep-0029-deprecation_policy) +alongside the rest of the Scientific Python ecosystem, and therefore supports: + +* All minor versions of Python released 42 months prior to the project, + and at minimum the two latest minor versions. +* All minor versions of NumPy released in the 24 months prior to the project, + and at minimum the last three minor versions. + +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. + + ## Making a Release We try to automate the release process as much as possible. diff --git a/doc/install.rst b/doc/install.rst index 045a07a2420..b3a000b1143 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -80,7 +80,7 @@ Dependencies PyGMT requires the following libraries to be installed: -* `numpy `__ +* `numpy `__ (>= 1.17) * `pandas `__ * `xarray `__ * `netCDF4 `__ @@ -90,15 +90,6 @@ The following are optional (but recommended) dependencies: * `IPython `__: For embedding the figures in Jupyter notebooks. -Note that PyGMT has adopted -`NEP29 `__ alongside the rest -of the Scientific Python ecosystem, and therefore supports: - -* All minor versions of Python released 42 months prior to the project, - and at minimum the two latest minor versions. -* All minor versions of NumPy released in the 24 months prior to the project, - and at minimum the last three minor versions. - Installing GMT and other dependencies ------------------------------------- From 376b41d0b3b5908d44e0c64ecf859e258ecf3ed8 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 23 Mar 2021 17:00:47 +1300 Subject: [PATCH 16/17] List NumPy in compatibility version list on main README.rst page --- README.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 7cf54a3bab0..253a367b873 100644 --- a/README.rst +++ b/README.rst @@ -229,14 +229,15 @@ Documentation for other versions * `v0.1.0 `__ * `v0.0.1a0 `__ -Compatibility with Python and GMT versions ------------------------------------------- +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 0.3.x >=6.1.1 >=3.7 0.2.1 >=6.1.1 >=3.6 0.2.0 >=6.1.1 3.6 - 3.8 0.1.x >=6.0.0 3.6 - 3.8 -======= ========== ========= +======= ========== ========= ========= From 1016331f6ae94ec7ac744588dd2b64fdf685a77a Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 23 Mar 2021 19:47:09 +1300 Subject: [PATCH 17/17] Remove hardcoded Python/NumPy versions in MAINTENANCE.md docs --- MAINTENANCE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index 1019090d316..d634044916f 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -78,8 +78,8 @@ There are 9 configuration files located in `.github/workflows`: This is run on every commit to the *master* and Pull Request branches. It is also scheduled to run daily on the *master* branch. - In draft Pull Requests, only two jobs on Linux (Python 3.7 / NumPy 1.17 and - Python 3.9/ NumPy 1.20) are triggered to save on Continuous Integration + In draft Pull Requests, only two jobs on Linux (minimum NEP29 Python/NumPy versions + and latest Python/NumPy versions) are triggered to save on Continuous Integration resources. 3. `ci_docs.yml` (Build documentation on Linux/macOS/Windows)