Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/community-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:
run: |
uv run scripts/render_community_descriptor.py \
--ref "$RELEASE_REF" \
--out build/community-extensions/extensions/duckdb_zarr/description.yml
--out build/community-extensions/extensions/zarr/description.yml

- name: Validate rendered descriptor
run: |
uv run scripts/check_release_ready.py \
--description-path build/community-extensions/extensions/duckdb_zarr/description.yml \
--description-path build/community-extensions/extensions/zarr/description.yml \
--strict-community-ref

- name: Upload descriptor artifact
uses: actions/upload-artifact@v4
with:
name: duckdb_zarr-community-extension-descriptor
path: build/community-extensions/extensions/duckdb_zarr/description.yml
name: zarr-community-extension-descriptor
path: build/community-extensions/extensions/zarr/description.yml
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Release checklist:
4. Download the descriptor artifact from the `Community Extension Release`
workflow.
5. Open a PR against `duckdb/community-extensions` adding or updating
`extensions/duckdb_zarr/description.yml` with that artifact.
`extensions/zarr/description.yml` with that artifact.

See [docs/community-extension-release.md](docs/community-extension-release.md)
for the detailed release and DuckDB-version policy.
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ name = "duckdb_zarr"
path = "src/wasm_lib.rs"
crate-type = ["staticlib"]

[[example]]
# Community extension builds use extension.name from description.yml as
# EXTENSION_NAME, so provide the same staticlib example under the published name.
name = "zarr"
path = "src/wasm_lib_zarr.rs"
crate-type = ["staticlib"]

[dependencies]
duckdb = { version = "=1.10504.0", features = ["loadable-extension"] }
# Base zarrs features: no blosc here — blosc_src bundles pthreads that conflict
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ release-check:

render-community-descriptor:
@test -n "$(REF)" || (echo "Usage: make render-community-descriptor REF=v0.1.0" >&2; exit 1)
python3 scripts/render_community_descriptor.py --ref "$(REF)" --out build/community-extensions/extensions/duckdb_zarr/description.yml
python3 scripts/check_release_ready.py --description-path build/community-extensions/extensions/duckdb_zarr/description.yml --strict-community-ref
python3 scripts/render_community_descriptor.py --ref "$(REF)" --out build/community-extensions/extensions/zarr/description.yml
python3 scripts/check_release_ready.py --description-path build/community-extensions/extensions/zarr/description.yml --strict-community-ref

generate_fixtures:
@if command -v uv >/dev/null 2>&1; then \
Expand Down
2 changes: 1 addition & 1 deletion description.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extension:
name: duckdb_zarr
name: zarr
description: Query Zarr array stores (v2 and v3) with SQL — read xarray-convention datasets as tables
version: 0.1.0
language: Rust
Expand Down
8 changes: 4 additions & 4 deletions docs/community-extension-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ make render-community-descriptor REF=v0.1.0
```

The rendered file is written to
`build/community-extensions/extensions/duckdb_zarr/description.yml` with
`build/community-extensions/extensions/zarr/description.yml` with
`repo.ref` set to the release tag.

## GitHub Release Automation
Expand Down Expand Up @@ -84,14 +84,14 @@ Re-enable platforms only after the CI build and SQLLogic tests pass for them.
4. Download the validated descriptor artifact from the `Community Extension
Release` workflow.
5. Open a PR against `duckdb/community-extensions` adding or updating
`extensions/duckdb_zarr/description.yml` with that artifact.
`extensions/zarr/description.yml` with that artifact.

After the PR is merged and built by DuckDB's community infrastructure, users can
install with:

```sql
INSTALL duckdb_zarr FROM community;
LOAD duckdb_zarr;
INSTALL zarr FROM community;
LOAD zarr;
```

## DuckDB Version Policy
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_release_ready.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main() -> int:
)

descriptor_checks = {
"extension.name": r"^\s*name:\s*duckdb_zarr\s*$",
"extension.name": r"^\s*name:\s*zarr\s*$",
"extension.language": r"^\s*language:\s*Rust\s*$",
"extension.build": r"^\s*build:\s*cargo\s*$",
"extension.requires_toolchains": r'^\s*requires_toolchains:\s*["\']rust;python3["\']\s*$',
Expand Down
2 changes: 1 addition & 1 deletion scripts/render_community_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def main() -> int:
out = ROOT / args.out
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(render(args.ref, version), encoding="utf-8")
print(f"wrote {out.relative_to(ROOT)} for duckdb_zarr {version} at {args.ref}")
print(f"wrote {out.relative_to(ROOT)} for zarr {version} at {args.ref}")
return 0


Expand Down
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,13 @@ pub unsafe extern "C" fn duckdb_zarr_init_c_api(
}
}
}

/// # Safety
/// Entrypoint called by DuckDB for the community extension name.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn zarr_init_c_api(
info: duckdb::ffi::duckdb_extension_info,
access: *const duckdb::ffi::duckdb_extension_access,
) -> bool {
unsafe { duckdb_zarr_init_c_api(info, access) }
}
4 changes: 1 addition & 3 deletions src/wasm_lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![allow(special_module_name)]

mod lib;
include!("lib.rs");

// To build the Wasm target, a `staticlib` crate-type is required
//
Expand Down
1 change: 1 addition & 0 deletions src/wasm_lib_zarr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include!("lib.rs");
Loading