pizzarr uses three branch types tied to its two distribution tiers (CRAN and r-universe).
developβ active development. All pull requests should targetdevelop, notmain. DESCRIPTION carries a.9000suffix (e.g.,0.2.0.9000) and Cargo.toml uses a-devpre-release tag (0.2.0-dev).release/X.Y.Zβ release candidate. Cut fromdevelopwhen ready to ship. The.9000/-devsuffixes are dropped andNEWS.mdis finalized. For a CRAN release, the CRAN tarball is built withbash tools/cran-build.sh. This branch is PR'd tomain.mainβ release-only and the GitHub default branch. Always matches the latest release, whether that release went to CRAN and r-universe or to r-universe alone. r-universe auto-builds frommain; its binaries include the compiled zarrs Rust backend. pkgdown deploys frommain.
A release goes to both tiers or to r-universe only. An r-universe-only release is a full release, not a preview: use it when the changes do not need to reach CRAN, such as Rust dependency updates, zarrs backend fixes, or fixes that can wait for the next CRAN release.
The release sequence:
- Development proceeds on
develop(versionX.Y.Z.9000). - Cut a
release/X.Y.Zbranch fromdevelop. Drop the.9000/-devsuffixes and finalizeNEWS.md. For an r-universe-only release, say so at the top of theNEWS.mdsection. - Open a PR from
release/X.Y.Ztomain.- CRAN and r-universe: build the CRAN tarball with
bash tools/cran-build.shand submit it. Do not merge until CRAN has accepted the package. - r-universe only: merge once CI passes. No CRAN submission.
- CRAN and r-universe: build the CRAN tarball with
- After merging, r-universe picks up the new commit on
mainand builds binaries with the zarrs backend. pkgdown rebuilds. - Merge
mainback intodevelopand bump the version to the nextX.Y.Z.9000.
After an r-universe-only release, r-universe carries a newer version
than CRAN until the next CRAN release. The builds also differ: CRAN gets
pure R (no Rust), r-universe gets the zarrs backend. Users can check
which tier they have with pizzarr_compiled_features().
# make sure you are on the develop branch
setwd("path/to/pizzarr")
install.packages("devtools")
devtools::install()
devtools::load_all()pizzarr has two build tiers that affect how you develop and test locally.
If you are working on R-side logic (indexers, stores, codecs, R6 classes) and do not need the zarrs backend, this is the faster cycle:
devtools::load_all()
devtools::test()
devtools::check()Tests run single-threaded (Config/testthat/parallel: false in
DESCRIPTION). All zarrs-specific tests skip automatically when the Rust
library is absent β they guard on .pizzarr_env$zarrs_available.
To produce a CRAN-ready source tarball that strips src/, configure,
and SystemRequirements:
bash tools/cran-build.shThe resulting .tar.gz passes R CMD check without a Rust toolchain.
The r-universe build compiles the zarrs Rust crate via extendr. You need rustc >= 1.91 with the GNU target on Windows:
rustup target add x86_64-pc-windows-gnuAfter modifying any #[extendr] function in src/rust/src/lib.rs,
regenerate the R wrappers:
rextendr::document()This rebuilds the Rust library and regenerates R/extendr-wrappers.R.
Never edit that file by hand. Then run the standard cycle:
devtools::load_all()
devtools::test()
devtools::check()devtools::check() will emit a NOTE about downloading Rust crates β that
is expected and is not a problem for r-universe builds. See
RUST-STYLE.md for Rust conventions, module layout, and
build pipeline details.
devtools::document()
pkgdown::build_site()- Style: snake_case everywhere (functions, methods, variables). 2-space indent.
- Errors:
stop("ErrorName(details)")β mimics Python Zarr error names. No rlang. - Warnings/info:
warning()andmessage()from base R. - Assertions: direct
if (...) stop()β no assertion library. - R6 docs: roxygen2 with
@title,@docType class,@format [R6::R6Class]. Seer6-roxygen-convention.mdfor the full style guide. - Tests: testthat 3e with
test_that("description", { ... }).
- Discussion of Zarr in R
- blosc
- Note:
pizzarrhas an optional dependency onbloscfor Blosc (de)compression.
- Note:
- R package development
- Zarr implementation