Skip to content

Commit dc4c3e0

Browse files
znorgaardclaude
andcommitted
test: disable MultiQC plot export in test profile for deterministic snapshots
MultiQC only renders multiqc_plots/ where its kaleido backend works (linux/amd64) and silently skips it on other archs (e.g. arm64, or amd64 under Rosetta), which made the default test's file-list snapshot environment-dependent. Instead of excluding the plots from the assertion, disable export_plots for tests via a new assets/multiqc_test_config.yml wired through the test profile's multiqc_config. Production runs keep export_plots: true. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1211766 commit dc4c3e0

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

assets/multiqc_test_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Test-only MultiQC overrides, merged on top of assets/multiqc_config.yml.
2+
# Disable static plot export (multiqc_plots/) so the test output is deterministic across
3+
# architectures: MultiQC only renders multiqc_plots/ where its kaleido backend works
4+
# (linux/amd64) and skips it elsewhere (e.g. arm64, or amd64 under Rosetta), which made the
5+
# file-list snapshot environment-dependent. Production runs keep export_plots: true.
6+
export_plots: false

conf/test.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ params {
2323

2424
// Genome references
2525
fasta = "https://raw.githubusercontent.com/nf-core/test-datasets/fastquorum/references/chr17.fa"
26+
27+
// Disable MultiQC static plot export so the output file list is deterministic across
28+
// architectures (multiqc_plots/ is only rendered where kaleido works, e.g. linux/amd64).
29+
multiqc_config = "${projectDir}/assets/multiqc_test_config.yml"
2630
}
2731

2832
validation {

docs/CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ Update the snapshots with the following command:
7777
nf-test test --tag test --profile +docker --verbose --update-snapshots
7878
```
7979

80+
> [!NOTE]
81+
> The `test` profile sets `multiqc_config = assets/multiqc_test_config.yml`, which disables
82+
> MultiQC static plot export (`export_plots: false`). MultiQC only renders `multiqc/multiqc_plots/`
83+
> where its kaleido backend works (linux/amd64) and silently skips it elsewhere (e.g. arm64, or
84+
> amd64 under Rosetta), so leaving it enabled makes the file-list snapshot architecture-dependent.
85+
> Disabling it for tests keeps snapshots deterministic and reproducible on any architecture.
86+
> Production runs are unaffected — `assets/multiqc_config.yml` keeps `export_plots: true`.
87+
8088
When you create a pull request with changes, GitHub Actions will run automatic tests.
8189
Pull requests are typically reviewed when these tests are passing.
8290

tests/default.nf.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ nextflow_pipeline {
1414

1515
then {
1616
// stable_name: All files + folders in ${params.outdir}/ with a stable name
17-
// multiqc_plots/ exports are environment-dependent (rendered on linux/amd64 CI but not on
18-
// some local arch), so exclude them from the file-list snapshot for stability.
19-
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}', 'multiqc/multiqc_plots', 'multiqc/multiqc_plots/**'])
17+
// (the test profile disables MultiQC static plot export, so multiqc_plots/ — which is
18+
// only rendered on some architectures — never appears here and the list is deterministic)
19+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
2020
// stable_path: All files in ${params.outdir}/ with stable content
2121
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
2222
// bam_files: All bam files

0 commit comments

Comments
 (0)