From 9d102eca66df21b58c587303dcdf8859a62e8c2c Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 21 Sep 2026 20:26:39 +0800 Subject: [PATCH 1/8] CI: Add filter settings in the actions/checkout step to speedup checkout --- .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 287d9065c23..99513287b1a 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -111,8 +111,8 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 + fetch-depth: 0 # Fetch all history so that setuptools-scm works. + filter: blob:none # But skip file contents of old commits (~1 GB) that aren't needed. persist-credentials: false lfs: false From 0ce507a1dc730c5208993667ec73b3cf0af5f874 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 22 Sep 2026 15:21:12 +0800 Subject: [PATCH 2/8] CI: Try treeless clone (tree:0) instead of blobless (blob:none) --- .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 99513287b1a..4a6216b5656 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -112,7 +112,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Fetch all history so that setuptools-scm works. - filter: blob:none # But skip file contents of old commits (~1 GB) that aren't needed. + filter: tree:0 # But skip trees/blobs of old commits (~590 MB) that aren't needed. persist-credentials: false lfs: false From 953a9a7047f1722f52fbf86476217995e51f2e48 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 22 Sep 2026 15:48:56 +0800 Subject: [PATCH 3/8] Update comments --- .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 4a6216b5656..612a79890bb 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -112,9 +112,9 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Fetch all history so that setuptools-scm works. - filter: tree:0 # But skip trees/blobs of old commits (~590 MB) that aren't needed. - persist-credentials: false + filter: tree:0 # Treeless clone to avoid downloading trees/blobs. lfs: false + persist-credentials: false - name: Get current week number of year id: date From c755ca2081ab5aef5646eabd77dee4013036ae3b Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 23 Sep 2026 10:22:05 +0800 Subject: [PATCH 4/8] Revert "Update comments" This reverts commit 953a9a7047f1722f52fbf86476217995e51f2e48. --- .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 612a79890bb..4a6216b5656 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -112,9 +112,9 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Fetch all history so that setuptools-scm works. - filter: tree:0 # Treeless clone to avoid downloading trees/blobs. - lfs: false + filter: tree:0 # But skip trees/blobs of old commits (~590 MB) that aren't needed. persist-credentials: false + lfs: false - name: Get current week number of year id: date From d755b1ded39a1e77c04dc154638a796d89c59e1e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 23 Sep 2026 10:22:14 +0800 Subject: [PATCH 5/8] Revert "CI: Try treeless clone (tree:0) instead of blobless (blob:none)" This reverts commit 0ce507a1dc730c5208993667ec73b3cf0af5f874. --- .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 4a6216b5656..99513287b1a 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -112,7 +112,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Fetch all history so that setuptools-scm works. - filter: tree:0 # But skip trees/blobs of old commits (~590 MB) that aren't needed. + filter: blob:none # But skip file contents of old commits (~1 GB) that aren't needed. persist-credentials: false lfs: false From 7b310090245c2b46a96cb93d065ca201b7d3a842 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 23 Sep 2026 10:22:53 +0800 Subject: [PATCH 6/8] Revert "CI: Add filter settings in the actions/checkout step to speedup checkout" This reverts commit 9d102eca66df21b58c587303dcdf8859a62e8c2c. --- .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 cea129a25d8..3d346c9c2c1 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -111,8 +111,8 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - fetch-depth: 0 # Fetch all history so that setuptools-scm works. - filter: blob:none # But skip file contents of old commits (~1 GB) that aren't needed. + # fetch all history so that setuptools-scm works + fetch-depth: 0 persist-credentials: false lfs: false From 4bff6a67f1d327259ae2135493609df3087491c8 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 22 Sep 2026 18:06:02 +0800 Subject: [PATCH 7/8] Bump to setuptools-scm>=10.0.4 and set pre_parse to fecth_on_shallow --- .github/workflows/ci_tests.yaml | 2 -- pyproject.toml | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 3d346c9c2c1..ef866da89d7 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -111,8 +111,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false lfs: false diff --git a/pyproject.toml b/pyproject.toml index 6b936f8b7fa..43e081b3458 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=80", "setuptools-scm>=9.2"] +requires = ["setuptools>=80", "setuptools-scm>=10.0.4"] build-backend = "setuptools.build_meta" [project] @@ -70,6 +70,9 @@ version_scheme = "release-branch-semver" local_scheme = "node-and-date" fallback_version = "999.999.999+unknown" +[tool.setuptools_scm.scm.git] +pre_parse = "fetch_on_shallow" + [tool.codespell] ignore-words-list = "astroid,te,tripel,trough" From 3b64e36a90959dba235822bb136f7a830d8ff2f3 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 23 Sep 2026 10:25:38 +0800 Subject: [PATCH 8/8] Remove fetch-depth settings from other workflows --- .github/workflows/benchmarks.yml | 2 -- .github/workflows/cache_data.yaml | 2 -- .github/workflows/ci_docs.yml | 4 ---- .github/workflows/ci_doctests.yaml | 2 -- .github/workflows/ci_tests_dev.yaml | 2 -- .github/workflows/ci_tests_legacy.yaml | 2 -- .github/workflows/publish-to-pypi.yml | 2 -- 7 files changed, 16 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 18c8fce2be9..16f87c22822 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -38,8 +38,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false - name: Get current week number of year diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 6994fe6ad93..44ec399ba1d 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -44,8 +44,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false # Install Micromamba with conda-forge dependencies diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index 5cf865b8bbb..6698d3a9a2a 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -77,8 +77,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false - name: Get current week number of year @@ -197,8 +195,6 @@ jobs: ref: gh-pages # Checkout to this folder instead of the current one path: deploy - # Download the entire history - fetch-depth: 0 persist-credentials: true if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') diff --git a/.github/workflows/ci_doctests.yaml b/.github/workflows/ci_doctests.yaml index c6ce9b0a27a..f384ea0d341 100644 --- a/.github/workflows/ci_doctests.yaml +++ b/.github/workflows/ci_doctests.yaml @@ -39,8 +39,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false # Install Micromamba with conda-forge dependencies diff --git a/.github/workflows/ci_tests_dev.yaml b/.github/workflows/ci_tests_dev.yaml index 593029c2859..943a4d2b9b2 100644 --- a/.github/workflows/ci_tests_dev.yaml +++ b/.github/workflows/ci_tests_dev.yaml @@ -54,8 +54,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false lfs: false diff --git a/.github/workflows/ci_tests_legacy.yaml b/.github/workflows/ci_tests_legacy.yaml index 6e563b6aada..34995ffc210 100644 --- a/.github/workflows/ci_tests_legacy.yaml +++ b/.github/workflows/ci_tests_legacy.yaml @@ -48,8 +48,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false # Install Micromamba with conda-forge dependencies diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 9eb71dcbf17..e2579edc7a4 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -45,8 +45,6 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - # fetch all history so that setuptools-scm works - fetch-depth: 0 persist-credentials: false - name: Set up Python