Repository navigation
Testing
All test tools are installed by environment.yaml. Activate the environment before running them:
conda activate ChoCallateThe Python regression suite builds small pysam fixtures in code and exercises the pure-pysam and Cython consensus paths, BAM post-processing, merge, validation, resources, retries, resume/cache and cleanup.
pytest -q tests/pythonBuild the optional accelerator first to enable the Cython-path cases:
python bin/build_consensus_accel.py
pytest -q tests/pythonWithout the accelerator, the suite skips the accelerated cases and runs the pure-pysam implementation. Set CHOCALLATE_NO_ACCEL=1 when running bin/generate_consensus.py directly to force the pure-pysam path.
tests/python/test_validation.py runs the Nextflow entry point to check schema, samplesheet, caller, read-group, index-prefix and open-file-limit validation. It needs Nextflow and the pipeline plugins and is skipped when nextflow is not on PATH.
The nf-test suite contains module tests and end-to-end pipeline cases. The pipeline cases use the bundled test_run data.
nf-test testRe-record snapshots after an intentional output change:
nf-test test --update-snapshotTo verify snapshots without recording new ones, use CI mode:
nf-test test --ci--verbose shows Nextflow output while tests run. The pipeline cases cover merged and per-sample output, all-sites consensus, caller headers, caller failure modes, empty coverage, missing indexes and index staging with stageInMode: copy; module tests additionally cover gVCF block export and the merge chain.
ruff check .
nextflow lint .
actionlintAll three commands currently pass without warnings.
GitHub Actions runs:
ruffnextflow lintactionlint- pytest with and without the Cython accelerator
- nf-test in CI mode
- Docker image build and smoke tests, including accelerator import and offline plugin resolution
The bundled test_run dataset is a 200-kb slice with 20,000 read pairs, so the end-to-end pipeline case takes about 3 minutes.