nextflow-io / nextflow-io/nextflow
Add function to exit cleanly
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 3.5k
- Forks
- 811
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 61
Description
New feature
In order for Nextflow to play nicely in managed environments, we need to avoid using System.exit calls, and the recently depreciated exit() Nextflow function.
For problems with pipeline execution, we can use the error() Nextflow function, however there is no equivalent for exiting cleanly if we just want to stop without any problems.
Usage scenario
Example current usage of exit 0 in nf-core pipelines, after printing usage information to the terminal:
if (params.help) {
log.info paramsHelp("nextflow run my_pipeline --input input_file.csv")
exit 0
}
Suggest implementation
Equivalent of error() but with exit code 0 and no terminal output. Any supplied strings should not be coloured red.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file or test is named; start by locating the existing error() and deprecated exit() function implementations in Nextflow. Add a clean-exit function that stops with code 0, produces no terminal output, and does not color supplied strings red, then add coverage for the usage scenario described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100