nf-core / nf-core/tools

Use resource limits instead of setting process directives in nf-test configuration

Open
#3,066 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of feature

Similar to https://github.com/nf-core/tools/pull/3037, we should set the maximum cpu, memory and time limit on nf-tests. This can be mostly done by the -profile test however it is beneficial to set a hard limit when using nf-tests so accidentally not using the test profile does not cause issues.

See https://github.com/nf-core/rnaseq/blob/99fb7efc9d2b17a7940f745570ff162c04548bc4/tests/nextflow.config#L23-L30 for current implementation in tests/nextflow.config:

// Impose sensible resource limits for testing
process {
    withName: '.*' {
        cpus   = 2
        memory = 3.GB
        time   = 2.h
    }
}

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

Compare the requested behavior with nf-core/tools PR 3037 and the example in tests/nextflow.config from nf-core/rnaseq. Start by locating how nf-tests apply the -profile test configuration, then verify that CPU, memory, and time limits remain enforced when that profile is omitted.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.