nf-snapshot @ 0.2.1
Summary
Use nf-snapshot to compare a full Nextflow run's published files against a JSON snapshot you commit to the pipeline repository. If the outputs differ, the run exits with status 1.
Get Started
Declare the plugin at the top level of nextflow.config, then enable it in a profile for each test that has a snapshot. Nextflow 26.10.0 did not load nf-snapshot from a profile. Set snapshot.enabled = true to enable the check.
plugins { id 'nf-snapshot@0.2.1' }
profiles {
test_full {
snapshot {
enabled = true
file = 'tests/snapshots/test_full.json'
ignore = ['pipeline_info/**']
nameOnly = ['**/*.html', '**/*.log']
}
}
}
Create the snapshot, then commit it:
NXF_SNAPSHOT_UPDATE=true nextflow run . -profile test_full
Later runs verify against it:
nextflow run . -profile test_full
To accept existing outputs without re-running, run from the project directory:
nextflow plugin nf-snapshot:update --profile test_full --outputDir results
Examples
If the outputs differ, the run prints a diff and fails:
nf-snapshot: outputs differ from /path/to/tests/snapshots/test_full.json
missing: salmon/sample2/quant.sf
changed: multiqc/multiqc_data/multiqc_general_stats.txt
unexpected: salmon/sample3/quant.sf
Snapshot format example:
{
"files": {
"multiqc/multiqc_report.html": null,
"salmon/sample1/quant.sf": "9e107d9d372bb6826bd81d3542a419d6",
"star/sample1.bam": "size:104857600"
}
}
Each entry holds the MD5 of the file content, size:<bytes> for size-only files, or null for name-only files.
License
Apache License, Version 2.0
| Nextflow version | >=26.04.6 |
|---|---|
| Depends On | - |
| Release Date | 23 Oct 2026 17:09:16 (UTC) |
| Release Notes | - |
| Download URL | https://registry.nextflow.io/api/v1/plugins/nf-snapshot/0.2.1/download/nf-snapshot-0.2.1.zip |
| Store URL | https://public.cr.seqera.io/v2/nextflow/plugin/nf-snapshot/blobs/sha256:8b7bc189ebf1dd4f8fede6e0b4a0fdd051137f51b52ee2ab1363f854d115f011 |
| Size | 28.1 KB |
| Checksum | 284c3cc22ed0c8b8078c9c18ccc293a262038b71777cc3fc6a8d263dcbd7c49fd38f0da3e5cc37410127b36a49b0372f57214baa5d8fd1fee1dbcf7fb31488bc |
| Total downloads | 0 View trends |
| Security Scan |