Use pixi for a reproducible environment including a Rust toolchain, Python with anndata, mudata and pytest, and bcftools.
The Rust engine lives in src/lib/, and the Python package and the annatar command live in python/annatar/.
The extension, annatar._native, is built by maturin with the python feature from src/lib/python.rs.
Build it into the pixi environment and try the command with:
pixi run develop
pixi run annatar --helpInstall from GitHub with Rust:
pip install 'git+https://github.com/clintval/annatar'All must pass before a change is submitted:
pixi run fmt-check
pixi run lint
pixi run lint-python
pixi run test
pixi run test-readback- The
fmt-checktask verifies formatting withcargo fmt -- --check;pixi run fmtapplies it. - The
linttask runs clippy on all targets with warnings denied. - The
lint-pythontask checks the Python formatting, lint and types withruffandmypy. - The
testtask runs the Rust unit and integration tests. - The
test-readbacktask builds the extension first, drives the realannatarcommand, reads every output back with Pythonanndata, and checksannatar.read_vcfagainst the h5ad of the command on every fixture andannatar.concatagainstannatar merge.
Push a tag that matches the version in Cargo.toml (such as 0.1.0) from the main branch.
The publish workflow tests, builds and checks the sdist and wheels, publishes them to PyPI, and creates the GitHub release with a changelog from git-cliff.
The release job needs a repository environment named github.
PyPI needs a trusted publisher set up before the first release, for the project annatar, the workflow publish_annatar.yml and the environment pypi, and the repository needs an environment with that name.