nf-core / nf-core/tools

Add example assertions into the nf-test template

Open
#3,738 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

template
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of feature

Could we add some example assertions, or at least a link to the help page on them?

                { assert snapshot(
                    process.out,
                    process.out.versions,
                    path(process.out.versions[0]).yaml
                    /* Examples of other assertions
                    file(process.out.bai[0][1]).name, // check file name only, assuming bai channel has a meta map
                    bam(process.out.bam[0][1]).getReadsMD5(), // summary of reads present in a bam file
                    path(process.out.vcf[0][1]).vcf.summary, // summary for variants in a vcf file
                    */
                ).match() }
            )
        }
``

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the nf-test template referenced by the issue and review its existing snapshot assertion example. Check the available assertion help alongside the template, then add representative assertion examples or a help-page link; done means the template gives users actionable assertion guidance.

Written by the indexing model from the issue text.

Assessment

Domain
testing, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.