From 3422b1d8edcf7eeba23cae745fadf5fcd9ab5151 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 14:28:17 +0800 Subject: [PATCH 01/11] Do not install dvc from conda-forge --- .github/workflows/ci_tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index a4dec189c8c..c3e196a66ad 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -133,7 +133,6 @@ jobs: xarray${{ matrix.xarray-version }} netCDF4 packaging - dvc make pip python-build From bfd9289e8c6644ef59ea265a6c79d6709b8096d5 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 14:35:06 +0800 Subject: [PATCH 02/11] Use iterative/setup-dvc --- .github/workflows/ci_tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index c3e196a66ad..99dbcc55511 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -153,6 +153,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} + - name: Setup data version control (DVC) + uses: iterative/setup-dvc@v1.1.2 + # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote run: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ From b5a5b1cb2c41b3104b53cdee27c44b8ba35ca6b0 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 14:43:18 +0800 Subject: [PATCH 03/11] Use pip to install dvc --- .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 99dbcc55511..fb58a98c0a0 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -154,7 +154,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Setup data version control (DVC) - uses: iterative/setup-dvc@v1.1.2 + run: python -m pip install dvc # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote From e66e8926deffa5d4a1e3aa56e10da633c71a1cb2 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 14:51:00 +0800 Subject: [PATCH 04/11] Install dvc via choco on Windows --- .github/workflows/ci_tests.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index fb58a98c0a0..0e828af2830 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -153,8 +153,13 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Setup data version control (DVC) + - name: Setup data version control (DVC) [Unix] run: python -m pip install dvc + if: runner.os != 'Windows' + + - name: Setup data version control (DVC) [Windows] + run: choco install dvc + if: runner.os == 'Windows' # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote From 848dd8c6587a23d4084ae17b6cbcc5be57f6a8c2 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 15:01:24 +0800 Subject: [PATCH 05/11] Install dvc via winget on Windows --- .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 0e828af2830..d210c74464d 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -158,7 +158,7 @@ jobs: if: runner.os != 'Windows' - name: Setup data version control (DVC) [Windows] - run: choco install dvc + run: winget install --id Iterative.DVC if: runner.os == 'Windows' # Pull baseline image data from dvc remote (DAGsHub) From d86491b9dd3d04b49818098fc997dfbce88f94bf Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 15:04:08 +0800 Subject: [PATCH 06/11] Revert "Install dvc via winget on Windows" This reverts commit 848dd8c6587a23d4084ae17b6cbcc5be57f6a8c2. --- .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 d210c74464d..0e828af2830 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -158,7 +158,7 @@ jobs: if: runner.os != 'Windows' - name: Setup data version control (DVC) [Windows] - run: winget install --id Iterative.DVC + run: choco install dvc if: runner.os == 'Windows' # Pull baseline image data from dvc remote (DAGsHub) From 75af0a831448c89f5e2fcb1e8ce2a518f9b10559 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 15:04:15 +0800 Subject: [PATCH 07/11] Revert "Install dvc via choco on Windows" This reverts commit e66e8926deffa5d4a1e3aa56e10da633c71a1cb2. --- .github/workflows/ci_tests.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 0e828af2830..fb58a98c0a0 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -153,13 +153,8 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Setup data version control (DVC) [Unix] + - name: Setup data version control (DVC) run: python -m pip install dvc - if: runner.os != 'Windows' - - - name: Setup data version control (DVC) [Windows] - run: choco install dvc - if: runner.os == 'Windows' # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote From aa06f58ebfd78abf51940de05d6030c20bab32cf Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 15:53:46 +0800 Subject: [PATCH 08/11] See if uv is faster --- .github/workflows/ci_tests.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index fb58a98c0a0..f1b8150cd65 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -153,8 +153,11 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Setup data version control (DVC) - run: python -m pip install dvc + - name: Install uv + uses: astral-sh/setup-uv@v4.2.0 + + - name: Install dvc + run: uv pip install dvc # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote From 83bb2d73436447b03b92586fd8380a5da663a592 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 16:50:10 +0800 Subject: [PATCH 09/11] Check if it works well with Python 3.13 --- .github/workflows/ci_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index f1b8150cd65..ad3cf4a8a15 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -56,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.10', '3.12'] + python-version: ['3.10', '3.13'] os: [ubuntu-latest, macos-latest, windows-latest] # Is it a draft Pull Request (true or false)? isDraft: @@ -75,7 +75,7 @@ jobs: xarray-version: '=2023.04' optional-packages: ' contextily geopandas<1 ipython pyarrow rioxarray sphinx-gallery' # Python 3.12 + core packages (latest versions) + optional packages - - python-version: '3.12' + - python-version: '3.13' numpy-version: '2.2' pandas-version: '' xarray-version: '' From 86f51c40d0f9e17a180ea607f28cf355f0329c7c Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 17:01:12 +0800 Subject: [PATCH 10/11] Revert "Check if it works well with Python 3.13" This reverts commit 83bb2d73436447b03b92586fd8380a5da663a592. --- .github/workflows/ci_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index ad3cf4a8a15..f1b8150cd65 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -56,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.10', '3.13'] + python-version: ['3.10', '3.12'] os: [ubuntu-latest, macos-latest, windows-latest] # Is it a draft Pull Request (true or false)? isDraft: @@ -75,7 +75,7 @@ jobs: xarray-version: '=2023.04' optional-packages: ' contextily geopandas<1 ipython pyarrow rioxarray sphinx-gallery' # Python 3.12 + core packages (latest versions) + optional packages - - python-version: '3.13' + - python-version: '3.12' numpy-version: '2.2' pandas-version: '' xarray-version: '' From 71df56aa6388c4586f77ab041582d27234296ae7 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Dec 2024 19:40:50 +0800 Subject: [PATCH 11/11] Install dvc in an isolated env --- .github/workflows/ci_tests.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index f1b8150cd65..fe31e6b2ec2 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -157,11 +157,17 @@ jobs: uses: astral-sh/setup-uv@v4.2.0 - name: Install dvc - run: uv pip install dvc + run: | + uv venv + source .venv/bin/activate + uv pip install dvc + uv pip list # Pull baseline image data from dvc remote (DAGsHub) - name: Pull baseline image data from dvc remote - run: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ + run: | + source .venv/bin/activate + uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ # Install the package that we want to test - name: Install the package