Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple workflow in subworkflow #3486

Open
wants to merge 26 commits into
base: dev
Choose a base branch
from

Conversation

LouisLeNezet
Copy link
Contributor

@LouisLeNezet LouisLeNezet commented Mar 7, 2025

PR checklist

This PR should close #3479
However when multiple workflow are present in one main.nf the input and output are aggregated for all. Therefore if one of the workflow does not have any input or output but the other one does, no error will be thrown.
An easy fix would be to ban any file with more than one workflow (need template modification for local/utils_nfcore_*_pipeline

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@LouisLeNezet LouisLeNezet changed the title FIx multiple workflow in subworkflow Fix multiple workflow in subworkflow Mar 7, 2025
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.93%. Comparing base (5b1d830) to head (8dcb1c5).

Files with missing lines Patch % Lines
nf_core/subworkflows/lint/main_nf.py 85.71% 2 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LouisLeNezet
Copy link
Contributor Author

After consideration, I think it would be better to not allow the presence of mutliple process / workflow in a single file.
Doing so would allow for a better description (one meta.yml / workflow) and organisation (simpler nf-test).
What do you think ?

@mirpedrol
Copy link
Member

After consideration, I think it would be better to not allow the presence of mutliple process / workflow in a single file.
Doing so would allow for a better description (one meta.yml / workflow) and organisation (simpler nf-test).
What do you think ?

I agree with this @LouisLeNezet 👍

@LouisLeNezet
Copy link
Contributor Author

Hi,
I've tried locally to reproduce the error, but it might be linked to the latest nextflow version.

N E X T F L O W  ~  version 25.02.0-edge
Launching `my-prefix-testpipeline/main.nf` [sharp_snyder] DSL2 - revision: 2017146e03
Downloading plugin [email protected]
A workflow named 'UTILS_NFSCHEMA_PLUGIN' is already defined or included in script: /home/runner/work/tools/tools/create-test-lint-wf/my-prefix-testpipeline/subworkflows/local/utils_nfcore_testpipeline_pipeline/main.nf

Comment on lines +37 to +38
description: Fastq file
pattern: "*.fastq"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the samplesheet can be csv, tsv, yamls or json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but this is the output of the read samplesheet.
In the template it only contains the metamap and fastq files, no ?

LouisLeNezet and others added 2 commits March 25, 2025 21:12
@LouisLeNezet LouisLeNezet requested a review from mirpedrol March 25, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants