diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 5fbbde2ec5c..1dc6acb3dc2 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -70,7 +70,7 @@ jobs: - os: windows-latest isDraft: true include: - # Python 3.11 + core packages (minimum supported versions) + optional packages (minimum supported versions if any) + # Python 3.11 + core packages (minimum supported versions) + optional packages - python-version: '3.11' numpy-version: '1.26' pandas-version: '=2.1' diff --git a/.github/workflows/ci_tests_legacy.yaml b/.github/workflows/ci_tests_legacy.yaml index 6701461da62..f5a7757cb6f 100644 --- a/.github/workflows/ci_tests_legacy.yaml +++ b/.github/workflows/ci_tests_legacy.yaml @@ -1,8 +1,8 @@ -# Test PyGMT with GMT legacy versions on Linux/macOS/Windows +# Test PyGMT with GMT legacy versions and old Python dependencies on Linux/macOS/Windows # -# This workflow runs regular PyGMT tests with GMT legacy versions. Due to the minor -# baseline image changes between GMT versions, the workflow only runs the tests but -# doesn't do image comparisons. +# This workflow runs regular PyGMT tests with GMT legacy versions and old versions of +# all optional and required Python dependencies. Due to minor baseline image changes +# between GMT versions, the workflow runs the tests but doesn't do image comparisons. # # It is scheduled to run every Tuesday on the main branch. # @@ -12,7 +12,7 @@ on: # push: # branches: [ main ] # Uncomment the 'pull_request' line below to trigger the workflow in PR - # pull_request: + pull_request: # types: [ready_for_review] # paths: # - 'pygmt/**' @@ -61,22 +61,6 @@ jobs: python=3.11 gmt=${{ matrix.gmt_version }} ghostscript<10 - numpy=1.26 - pandas - xarray - packaging - contextily=1.5 - geopandas=1.0 - ipython - pyarrow-core=16 - rioxarray - sphinx-gallery - make - pip - python-build - pytest - pytest-doctestplus - pytest-mpl # Download cached remote files (artifacts) from GitHub - name: Download remote data from GitHub @@ -93,10 +77,21 @@ jobs: env: GH_TOKEN: ${{ github.token }} + # Install uv package manager + - name: Install uv + uses: astral-sh/setup-uv@v6.0.0 + with: + activate-environment: true + python-version: 3.11 + # Install the package that we want to test - name: Install the package - run: make install + run: | + uv run --with pip==23 --resolution lowest-direct --all-extras --dev make install + uv pip list # Run the tests but skip images - name: Run tests - run: make test_no_images PYTEST_EXTRA="-r P" + run: uv run --with pytest==8,pytest-mpl==0.17,pytest-doctestplus==1.2 --resolution lowest-direct --all-extras --dev make test_no_images PYTEST_EXTRA="-r P" + env: + GMT_LIBRARY_PATH: $CONDA_PREFIX/lib diff --git a/pyproject.toml b/pyproject.toml index 82b07cd59f0..b5507f9a4fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ "numpy>=1.26", "pandas>=2.1", "xarray>=2023.07", - "packaging", + "packaging>=22.0", ] dynamic = ["version"] @@ -46,9 +46,9 @@ dynamic = ["version"] all = [ "contextily>=1.5", "geopandas>=1.0", - "IPython", # 'ipython' is not the correct module name. + "IPython>=8", # 'ipython' is not the correct module name. "pyarrow>=16", - "rioxarray", + "rioxarray>=0.14", ] [project.entry-points."xarray.backends"]