nextflow-io / nextflow-io/nextflow
Output the theoretical `.command.sh` file when using stub
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 3.5k
- Forks
- 811
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 61
Description
It would be great if there was a way to run a workflow with -stub but also get the result of what would have run in the script section.
Currently I have a work around that looks something like this:
script:
def prefix = task.ext.prefix ?: "${meta.id}"
def args = teask.ext.args ?: ""
"""
some command \
$input \
$args
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def args = teask.ext.args ?: ""
command = """
some command \
$input \
$args
"""
"""
echo '${command}'
touch myoutput.txt
"""
But obviously this creates a lot of code duplication and requires one to carefully keep the stub section aligned with every chaneg to the script section.
Suggest implementation
Could be default to output the would-be script to .command.sh.stub or something.
Or it could be an additional option like --stub-run-verbose or some such.
I am not sure how easy this would be to implement with how nextflow is written in honesty.
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 source files or tests are identified in the issue. Start by locating Nextflow's stub execution and command-script generation paths, then trace how the script section is rendered during a stub run. Done means a stub run exposes the theoretical script without requiring duplicated workflow code, with regression coverage for the output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100