diff --git a/.github/ISSUE_TEMPLATE/bump_gmt_checklist.md b/.github/ISSUE_TEMPLATE/bump_gmt_checklist.md index 4f4d652b080..c4d9a11e321 100644 --- a/.github/ISSUE_TEMPLATE/bump_gmt_checklist.md +++ b/.github/ISSUE_TEMPLATE/bump_gmt_checklist.md @@ -17,11 +17,13 @@ assignees: '' **To-Do for bumping the GMT version in CI**: - [ ] Bump the GMT version in CI (1 PR) + - [ ] Update `environment.yml` + - [ ] Update `ci/requirements/docs.yml` - [ ] Update `.github/workflows/cache_data.yaml` + - [ ] Update `.github/workflows/ci_doctests.yaml` - [ ] Update `.github/workflows/ci_docs.yml` - [ ] Update `.github/workflows/ci_tests.yaml` - - [ ] Update `ci/requirements/docs.yml` - - [ ] Update `environment.yml` + - [ ] Add the legacy GMT version to `.github/workflows/ci_tests_legacy.yaml` - [ ] Fix failing tests (1 or more PRs) - [ ] Fix [xfail](https://docs.pytest.org/en/stable/skipping.html#xfail-mark-test-functions-as-expected-to-fail) pytest markers on tests that are now xpass @@ -31,5 +33,6 @@ assignees: '' - [ ] Update `required_version` in `pygmt/clib/session.py` - [ ] Update `test_get_default` in `pygmt/tests/test_clib.py` - [ ] Update compatibility table in `README.rst` + - [ ] Remove unsupported GMT version from `.github/workflows/ci_tests_legacy.yaml` - [ ] Remove [xfail](https://docs.pytest.org/en/stable/skipping.html#xfail-mark-test-functions-as-expected-to-fail) pytest markers on tests that are now xpass - [ ] Update deprecated syntax in source code and examples based on the [GMT Changelog](https://docs.generic-mapping-tools.org/latest/changes.html) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index e5d24031be4..2be12b0fa7a 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -33,23 +33,21 @@ jobs: # fetch all history so that setuptools-scm works fetch-depth: 0 - # Install Mambaforge with conda-forge dependencies - - name: Setup Mambaforge - uses: conda-incubator/setup-miniconda@v2.2.0 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@v15 with: + environment-name: pygmt + environment-file: false channels: conda-forge,nodefaults - channel-priority: strict - miniforge-version: latest - miniforge-variant: Mambaforge - mamba-version: "*" - run-post: false - use-mamba: true - - # Install GMT and other required dependencies from conda-forge - - name: Install dependencies - run: | - mamba install gmt=6.4.0 numpy pandas xarray netCDF4 packaging \ - build + extra-specs: | + python=3.11 + gmt=6.4.0 + numpy + pandas + xarray + netCDF4 + packaging + build # Install the package that we want to test - name: Install the package diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index d4fe48ef35d..17aa8fa2d5d 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -31,12 +31,11 @@ on: jobs: docs: - name: ${{ matrix.os }} - Python ${{ matrix.python-version }} + name: ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: ['3.11'] os: [ubuntu-latest, macOS-latest, windows-latest] # Is it a draft Pull Request (true or false)? isDraft: @@ -66,30 +65,35 @@ jobs: # fetch all history so that setuptools-scm works fetch-depth: 0 - # Install Mambaforge with conda-forge dependencies - - name: Setup Mambaforge - uses: conda-incubator/setup-miniconda@v2.2.0 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@v15 with: - activate-environment: pygmt - python-version: ${{ matrix.python-version }} + environment-name: pygmt + environment-file: false channels: conda-forge,nodefaults - channel-priority: strict - miniforge-version: latest - miniforge-variant: Mambaforge - mamba-version: "*" - run-post: false - use-mamba: true - - # Install GMT and other required dependencies from conda-forge - - name: Install dependencies - run: | - mamba install gmt=6.4.0 numpy pandas xarray netCDF4 packaging \ - build ipython make myst-parser contextily geopandas rioxarray \ - sphinx sphinx-copybutton sphinx-design sphinx-gallery sphinx_rtd_theme - - # Show installed pkg information for postmortem diagnostic - - name: List installed packages - run: mamba list + cache-downloads: true + cache-env: true + extra-specs: | + python=3.11 + gmt=6.4.0 + numpy + pandas + xarray + netCDF4 + packaging + contextily + geopandas + ipython + rioxarray + build + make + pip + myst-parser + sphinx + sphinx-copybutton + sphinx-design + sphinx-gallery + sphinx_rtd_theme # Download cached remote files (artifacts) from GitHub - name: Download remote data from GitHub diff --git a/.github/workflows/ci_doctests.yaml b/.github/workflows/ci_doctests.yaml index 4f50024ca57..de5158f16c7 100644 --- a/.github/workflows/ci_doctests.yaml +++ b/.github/workflows/ci_doctests.yaml @@ -40,32 +40,31 @@ jobs: # fetch all history so that setuptools-scm works fetch-depth: 0 - # Install Mambaforge with conda-forge dependencies - - name: Setup Mambaforge - uses: conda-incubator/setup-miniconda@v2.2.0 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@v15 with: - activate-environment: pygmt - python-version: '3.11' + environment-name: pygmt + environment-file: false channels: conda-forge,nodefaults - channel-priority: strict - miniforge-version: latest - miniforge-variant: Mambaforge - mamba-version: "*" - run-post: false - use-mamba: true - - # Install GMT and other required dependencies from conda-forge - - name: Install dependencies - run: | - mamba install gmt=6.4.0 numpy \ - pandas xarray netCDF4 packaging \ - build make 'pytest>=6.0' \ - pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery \ - contextily geopandas ipython rioxarray - - # Show installed pkg information for postmortem diagnostic - - name: List installed packages - run: mamba list + extra-specs: | + python=3.11 + gmt=6.4.0 + numpy + pandas + xarray + netCDF4 + packaging + contextily + geopandas + ipython + rioxarray + build + make + pip + pytest + pytest-doctestplus + pytest-mpl + sphinx-gallery # Download cached remote files (artifacts) from GitHub - name: Download remote data from GitHub diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 59f3791e330..81e41106845 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -67,7 +67,12 @@ jobs: optional-packages: '' - python-version: '3.11' numpy-version: '1.24' - optional-packages: 'contextily geopandas ipython rioxarray' + optional-packages: | + contextily + geopandas + ipython + rioxarray + timeout-minutes: 30 defaults: run: @@ -93,32 +98,32 @@ jobs: # fetch all history so that setuptools-scm works fetch-depth: 0 - # Install Mambaforge with conda-forge dependencies - - name: Setup Mambaforge - uses: conda-incubator/setup-miniconda@v2.2.0 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@v15 with: - activate-environment: pygmt - python-version: ${{ matrix.python-version }} + environment-name: pygmt + environment-file: false channels: conda-forge,nodefaults - channel-priority: strict - miniforge-version: latest - miniforge-variant: Mambaforge - mamba-version: "*" - run-post: false - use-mamba: true - - # Install GMT and other required dependencies from conda-forge - - name: Install dependencies - run: | - mamba install gmt=6.4.0 numpy=${{ matrix.numpy-version }} \ - pandas xarray netCDF4 packaging \ - ${{ matrix.optional-packages }} \ - build dvc make 'pytest>=6.0' \ - pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery - - # Show installed pkg information for postmortem diagnostic - - name: List installed packages - run: mamba list + cache-downloads: true + cache-env: true + extra-specs: | + python=${{ matrix.python-version }} + gmt=6.4.0 + numpy=${{ matrix.numpy-version }} + pandas + xarray + netCDF4 + packaging + ${{ matrix.optional-packages }} + build + dvc + make + pip + pytest + pytest-cov + pytest-doctestplus + pytest-mpl + sphinx-gallery # Download cached remote files (artifacts) from GitHub - name: Download remote data from GitHub diff --git a/.github/workflows/ci_tests_dev.yaml b/.github/workflows/ci_tests_dev.yaml index 4cb98f53484..5759ad5593f 100644 --- a/.github/workflows/ci_tests_dev.yaml +++ b/.github/workflows/ci_tests_dev.yaml @@ -38,7 +38,6 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.11'] os: [ubuntu-22.04, macOS-12, windows-2022] gmt_git_ref: [master] timeout-minutes: 30 @@ -90,32 +89,45 @@ jobs: comment-id: ${{ github.event.client_payload.github.payload.comment.id }} body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - # Install Mambaforge with conda-forge dependencies - - name: Setup Mambaforge - uses: conda-incubator/setup-miniconda@v2.2.0 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@v15 with: - activate-environment: pygmt - # python-version: ${{ matrix.python-version }} + environment-name: pygmt + environment-file: false channels: conda-forge,nodefaults - channel-priority: strict - miniforge-version: latest - miniforge-variant: Mambaforge - mamba-version: "*" - run-post: false - use-mamba: true - - # Install dependencies from conda-forge + cache-downloads: true + cache-env: true + extra-specs: | + python=3.11 + cmake + make + ninja + curl + fftw + ghostscript + hdf5 + libblas + libcblas + libgdal + liblapack + libnetcdf + pcre + zlib + geopandas + + # Install dependencies from PyPI - name: Install dependencies run: | - mamba install python=${{ matrix.python-version }} \ - ninja cmake libblas libcblas liblapack fftw libgdal \ - geopandas ghostscript libnetcdf hdf5 zlib curl pcre make python -m pip install --pre --prefer-binary \ numpy pandas xarray netCDF4 packaging \ build contextily dvc ipython rioxarray \ 'pytest>=6.0' pytest-cov pytest-doctestplus pytest-mpl \ sphinx-gallery + # Show installed pkg information for postmortem diagnostic + - name: List installed packages + run: micromamba list + # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote if: github.event_name == 'schedule' @@ -139,7 +151,7 @@ jobs: if: runner.os != 'Windows' - name: Install GMT dev version from conda-forge (Windows) - run: mamba install -c conda-forge/label/dev gmt + run: micromamba install -c conda-forge/label/dev gmt if: runner.os == 'Windows' # Download cached remote files (artifacts) from GitHub diff --git a/.github/workflows/ci_tests_legacy.yaml b/.github/workflows/ci_tests_legacy.yaml index 17830f6e2b5..f6da3fd66fc 100644 --- a/.github/workflows/ci_tests_legacy.yaml +++ b/.github/workflows/ci_tests_legacy.yaml @@ -31,7 +31,6 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] os: [ubuntu-20.04, macOS-11, windows-2019] gmt_version: ['6.3'] timeout-minutes: 30 @@ -53,32 +52,34 @@ jobs: # fetch all history so that setuptools-scm works fetch-depth: 0 - # Install Mambaforge with conda-forge dependencies - - name: Setup Mambaforge - uses: conda-incubator/setup-miniconda@v2.2.0 + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@v15 with: - activate-environment: pygmt - python-version: ${{ matrix.python-version }} + environment-name: pygmt + environment-file: false channels: conda-forge,nodefaults - channel-priority: strict - miniforge-version: latest - miniforge-variant: Mambaforge - mamba-version: "*" - run-post: false - use-mamba: true - - # Install GMT and other required dependencies from conda-forge - - name: Install dependencies - run: | - mamba install gmt=${{ matrix.gmt_version }} numpy \ - pandas xarray netCDF4 packaging \ - contextily geopandas ipython rioxarray \ - build dvc make 'pytest>=6.0' \ - pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery - - # Show installed pkg information for postmortem diagnostic - - name: List installed packages - run: mamba list + cache-downloads: true + cache-env: true + extra-specs: | + python=3.9 + gmt=${{ matrix.gmt_version }} + numpy + pandas + xarray + netCDF4 + packaging + contextily + geopandas + ipython + rioxarray + build + dvc + make + pip + pytest + pytest-doctestplus + pytest-mpl + sphinx-gallery # Download cached remote files (artifacts) from GitHub - name: Download remote data from GitHub