Development Environment¶
iqz uses uv and maturin
iqz is a mixed Python / Rust project, built with maturin. You will need uv and a Rust toolchain:
Setup¶
uv sync builds the native extension (iqz._native), and rebuilds it whenever Cargo.toml or rust/*.rs changes.
Tests¶
The tests include reference test vectors (tests/data/): blobs encoded by the original prototype, with the SHA-256 of the original data in manifest.json. Both backends must decode them exactly, and reproduce them byte for byte when built against the same libzstd version.
Benchmark single-threaded encode and decode throughput on the same vectors:
Info
The pre-commit hooks (ruff + pyright + pytest + cargo fmt + cargo clippy) can be run manually with uv run pre-commit run --all-files.
Releasing¶
Releases are built and published by the Release workflow (.github/workflows/release.yml), which builds an abi3 wheel per platform (Linux x86_64 / aarch64, macOS x86_64 / arm64, Windows x64) and the sdist, and tests each wheel before publishing.
- Bump the version in
pyproject.toml(andCargo.toml). - Optionally, run the workflow manually (Actions → Release → Run workflow) to publish to TestPyPI, and check that
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ iqzworks. - Create and publish a release on GitHub (Releases → Draft a new release), with a new tag such as
v0.1.0. Publishing the release publishes the package to PyPI; drafts do not.
Analysis¶
The measurements on the Analysis page are produced by a separate project in analysis/, with its own dependencies; see analysis/README.md. Its outputs (analysis/results/, and the figures and tables in docs/analysis/) are committed, so building the docs does not require the datasets.