Skip to content

Commit c664fc6

Browse files
authored
Merge branch 'main' into fix/validate-before-overwrite
2 parents 022b726 + f58644a commit c664fc6

11 files changed

Lines changed: 1178 additions & 10 deletions

File tree

‎.github/workflows/zarr-http-server-release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,34 @@ jobs:
6464
uv run --with "${wheel}" --python 3.12 --no-project \
6565
python -c "import zarr_http_server; print('zarr_http_server', zarr_http_server.__version__)"
6666
67+
# The sdist has to stand alone, and `hatch build` above builds the wheel
68+
# from the source tree, not from the sdist. So build a wheel from the
69+
# sdist with pip, which unpacks it under the sdist format's rules (no
70+
# links out of the archive), then run the package's own tests and strict
71+
# docs build from the unpacked sdist. This job has no checkout, so
72+
# nothing comes from the repository; zarr, where a package uses it,
73+
# resolves from PyPI.
74+
- name: Build a wheel from the sdist with pip
75+
run: |
76+
sdist=$(ls dist/*.tar.gz)
77+
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"
78+
79+
- name: Install just
80+
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
81+
with:
82+
repo: casey/just
83+
version: 1.58.0
84+
85+
- name: Test and build docs from the unpacked sdist
86+
env:
87+
UV_PYTHON: '3.12'
88+
run: |
89+
mkdir sdist
90+
tar -xzf dist/*.tar.gz -C sdist
91+
cd sdist/*/
92+
just test
93+
just docs-check
94+
6795
upload_pypi:
6896
name: Upload to PyPI
6997
needs: [build, test_artifacts]

‎.github/workflows/zarr-indexing-release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,34 @@ jobs:
6464
uv run --with "${wheel}" --python 3.12 --no-project \
6565
python -c "import zarr_indexing; print('zarr_indexing', zarr_indexing.__version__)"
6666
67+
# The sdist has to stand alone, and `hatch build` above builds the wheel
68+
# from the source tree, not from the sdist. So build a wheel from the
69+
# sdist with pip, which unpacks it under the sdist format's rules (no
70+
# links out of the archive), then run the package's own tests and strict
71+
# docs build from the unpacked sdist. This job has no checkout, so
72+
# nothing comes from the repository; zarr, where a package uses it,
73+
# resolves from PyPI.
74+
- name: Build a wheel from the sdist with pip
75+
run: |
76+
sdist=$(ls dist/*.tar.gz)
77+
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"
78+
79+
- name: Install just
80+
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
81+
with:
82+
repo: casey/just
83+
version: 1.58.0
84+
85+
- name: Test and build docs from the unpacked sdist
86+
env:
87+
UV_PYTHON: '3.12'
88+
run: |
89+
mkdir sdist
90+
tar -xzf dist/*.tar.gz -C sdist
91+
cd sdist/*/
92+
just test
93+
just docs-check
94+
6795
upload_pypi:
6896
name: Upload to PyPI
6997
needs: [build, test_artifacts]

‎.github/workflows/zarr-metadata-release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,34 @@ jobs:
6464
uv run --with "${wheel}" --python 3.12 --no-project \
6565
python -c "import zarr_metadata; print('zarr_metadata', zarr_metadata.__version__)"
6666
67+
# The sdist has to stand alone, and `hatch build` above builds the wheel
68+
# from the source tree, not from the sdist. So build a wheel from the
69+
# sdist with pip, which unpacks it under the sdist format's rules (no
70+
# links out of the archive), then run the package's own tests and strict
71+
# docs build from the unpacked sdist. This job has no checkout, so
72+
# nothing comes from the repository; zarr, where a package uses it,
73+
# resolves from PyPI.
74+
- name: Build a wheel from the sdist with pip
75+
run: |
76+
sdist=$(ls dist/*.tar.gz)
77+
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"
78+
79+
- name: Install just
80+
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
81+
with:
82+
repo: casey/just
83+
version: 1.58.0
84+
85+
- name: Test and build docs from the unpacked sdist
86+
env:
87+
UV_PYTHON: '3.12'
88+
run: |
89+
mkdir sdist
90+
tar -xzf dist/*.tar.gz -C sdist
91+
cd sdist/*/
92+
just test
93+
just docs-check
94+
6795
upload_pypi:
6896
name: Upload to PyPI
6997
needs: [build, test_artifacts]

‎.gitignore‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,3 @@ zarr.egg-info/
9696
.claude/
9797
CLAUDE.md
9898
docs/superpowers/
99-
# zarr-metadata package lockfile (a library, not an app)
100-
packages/zarr-metadata/uv.lock

‎changes/4407.misc.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Building `zarr` from source now requires `setuptools-scm>=9`, which replaces the deprecated `git_describe_command` version option with `scm.git.describe_command`.

‎packages/zarr-http-server/pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.29.0", "hatch-vcs"]
2+
requires = ["hatchling>=1.29.0", "hatch-vcs", "setuptools-scm>=9"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -82,7 +82,7 @@ tag-pattern = '^zarr_http_server-v(?P<version>.+)$'
8282
# `git_describe_command` ensures we get the zarr_http_server tags instead of latest.
8383
# `local_scheme` strips the git commit info so the appending info is just a counter from latest tag.
8484
# test-pypi doesn't accept git commit info in tags, and the count should be enough to distinguish unique runs.
85-
raw-options = { root = "../..", git_describe_command = "git describe --dirty --tags --long --match zarr_http_server-v*", local_scheme = "no-local-version" }
85+
raw-options = { root = "../..", scm = { git = { describe_command = "git describe --dirty --tags --long --match zarr_http_server-v*" } }, local_scheme = "no-local-version" }
8686

8787
[tool.hatch.build.targets.wheel]
8888
packages = ["src/zarr_http_server"]

‎packages/zarr-indexing/pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.29.0", "hatch-vcs"]
2+
requires = ["hatchling>=1.29.0", "hatch-vcs", "setuptools-scm>=9"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -73,7 +73,7 @@ tag-pattern = '^zarr_indexing-v(?P<version>.+)$'
7373
# `git_describe_command` ensures we get the zarr_indexing tags instead of latest.
7474
# `local_scheme` strips the git commit info so the appending info is just a counter from latest tag.
7575
# test-pypi doesn't accept git commit info in tags, and the count should be enough to distinguish unique runs.
76-
raw-options = { root = "../..", git_describe_command = "git describe --dirty --tags --long --match zarr_indexing-v*", local_scheme = "no-local-version" }
76+
raw-options = { root = "../..", scm = { git = { describe_command = "git describe --dirty --tags --long --match zarr_indexing-v*" } }, local_scheme = "no-local-version" }
7777

7878
[tool.hatch.build.targets.wheel]
7979
packages = ["src/zarr_indexing"]

‎packages/zarr-metadata/pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.29.0", "hatch-vcs"]
2+
requires = ["hatchling>=1.29.0", "hatch-vcs", "setuptools-scm>=9"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -68,7 +68,7 @@ tag-pattern = '^zarr_metadata-v(?P<version>.+)$'
6868
# `git_describe_command` ensures we get the zarr_metadata tags instead of latest.
6969
# `local_scheme` strips the git commit info so the appending info is just a counter from latest tag.
7070
# test-pypi doesn't accept git commit info in tags, and the count should be enough to distinguish unique runs.
71-
raw-options = { root = "../..", git_describe_command = "git describe --dirty --tags --long --match zarr_metadata-v*", local_scheme = "no-local-version" }
71+
raw-options = { root = "../..", scm = { git = { describe_command = "git describe --dirty --tags --long --match zarr_metadata-v*" } }, local_scheme = "no-local-version" }
7272

7373
[tool.hatch.build.targets.wheel]
7474
packages = ["src/zarr_metadata"]

0 commit comments

Comments
 (0)