Hi, I've fully migrated nf-core/phaseimpute to top...
# hackathon-oct-2025-versions-topics-adoption
l
Hi, I've fully migrated nf-core/phaseimpute to topic usage. I'm however confronted to
nf_test_content: 'tests/default.nf.test' does not snapshot a 'versions.yml' file
. The issue being that I do not have anymore such a file. Here is my test
Copy code
then {
    assertAll(
        { assert workflow.success },
        { assert snapshot(
            UTILS.getPipelineResults(outputDir, workflow),
            [
                "all_samples.glimpse1": UTILS.vcfDetails("$outputDir/imputation/glimpse1/concat/all_samples.batch0.glimpse1.vcf.gz")
            ]
        ).match() }
    )
}
With
UTILS.getPipelineResults
Copy code
class UTILS {
    public static def getPipelineResults(outdir, workflow){
        return [
            "workflow size": workflow.trace.succeeded().size(),
            "versions" : removeNextflowVersion("$outdir/pipeline_info/nf_core_phaseimpute_software_mqc_versions.yml"),
            ...
        ]
    }
}
n
The pipeline should still create that file with topics 😛
💯 1
It's needed for multiqc
m
#C01NHS4CC91 is fully migrated and create such a file
l
What I don't get is that I do have
"pipeline_info/nf_core_phaseimpute_software_mqc_versions.yml"
in my snapshot, but I still get the error 😕
😮 1
n
@mashehu any ideas?
l
After a bit of debugging, the might come from the fact that I store all the results in a dictionnary and not a list.
m
How do you get a dictionnary?
l
It's was just because I used
Copy code
return [
            "workflow size": workflow.trace.succeeded().size(),
            "versions" : removeNextflowVersion("$outdir/pipeline_info/nf_core_phaseimpute_software_mqc_versions.yml"),
            ...
        ]
m
Oh I see
l
After reading a bit more carefully, it's the
.nf.test
that needs to contains
versions.yml
. As I'm using a wrapper this is not detected. However if I change my
default.nf.test
to the following, i don't get the error anymore.
Copy code
nextflow_pipeline {

    name "Test pipeline"
    script "../main.nf"
    tag "pipeline"
    tag "nf-core/phaseimpute"
    tag "test"

    test("-profile test") {
        config "../conf/test.config"
        when {
            params {
                publish_dir_mode = "copy"
                pipelines_testdata_base_path = '<https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/phaseimpute/>'
                outdir = "$outputDir"
            }
        }

        then {
            assertAll(
                { assert workflow.success },
                { assert snapshot(
                    versions.yml, // With this line no more errors !
                    UTILS.getPipelineResults(outputDir, workflow),
                    [
                        "all_samples.glimpse1": UTILS.vcfDetails("$outputDir/imputation/glimpse1/concat/all_samples.batch0.glimpse1.vcf.gz")
                    ]
                ).match() }
            )
        }

    }
}
Why I don't get is why RNAVAR is fine but not mine 🤔
🤣 1
m
I wrote a check in nf-test so that anything not written by me will fail
That's how I hope to get hired by people 🤣
l
God damnit ! It's the same for seqinspector and sarek. You don't have a
versions.yml
in the default.nf.test but you don't have the error...
l
Seriously !! This is cheating
🤣 1
m
You're French, you should know there are rules and rules
🤣 1
🥖 1
🍷 1
l
shared a GIF
m
shared a GIF
🤣 1