nf-snapshot @ 0.2.0
Summary
nf-snapshot checks the files a Nextflow run publishes against a snapshot file committed to the pipeline repository, the way nf-test snapshots work, but for one full-size run. 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 the plugin when it was declared inside a profile. The plugin does nothing unless snapshot.enabled is set.
plugins { id 'nf-snapshot@0.2.0' }
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
Licensed under the Apache License, Version 2.0.
| Nextflow version | >=26.04.6 |
|---|---|
| Depends On | - |
| Release Date | 23 Oct 2026 13:11:39 (UTC) |
| Release Notes | - |
| Download URL | https://registry.nextflow.io/api/v1/plugins/nf-snapshot/0.2.0/download/nf-snapshot-0.2.0.zip |
| Store URL | https://public.cr.seqera.io/v2/nextflow/plugin/nf-snapshot/blobs/sha256:760a371f021d7b679ec0ace0effaf40feda35058598bc412efa7b19274a7fc87 |
| Size | 28.1 KB |
| Checksum | 4e01a50be16f96482dab768bb651877ebaeb7145285406be0503a9117ef99e991b208b64ca21285eaf14a0537b1d58787b2133c665a373eec8dd2eaedb4f7dce |
| Total downloads | 3 View trends |
| Security Scan |