From 40cd24c26de4d485ab8b4fef179a4a2f451a50f4 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Fri, 7 Mar 2025 10:48:07 +0100 Subject: [PATCH 01/23] Remove duplicate --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 51259938a8..054b393a6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,6 @@ jsonschema>=4.0 markdown>=3.3 packaging pillow -pdiff pre-commit prompt_toolkit<=3.0.48 pydantic>=2.2.1 From 763454c0a2da40a20915c103f4a44fd084068ee4 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Fri, 7 Mar 2025 10:48:42 +0100 Subject: [PATCH 02/23] Fix multiple workflow in main --- nf_core/subworkflows/lint/main_nf.py | 43 +++++++++++++++++++--------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index 3ad3f34864..4630557471 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -48,9 +48,20 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: state = "subworkflow" subworkflow_lines = [] workflow_lines = [] - main_lines = [] + main_lines = {} + open_brackets = close_brackets = 0 for line in lines: + # Keep track of open and close brackets + if "{" in line: + open_brackets += line.count("{") + if "}" in line: + close_brackets += line.count("}") + if open_brackets - close_brackets == 0: + state = "subworkflow" + if re.search(r"^\s*workflow\s*\w*\s*{", line) and state == "subworkflow": + workflow_name = re.findall(r"workflow\s*(\w*)\s*{", line)[0] + main_lines.update({workflow_name: []}) state = "workflow" if re.search(r"take\s*:", line) and state in ["workflow"]: state = "take" @@ -72,8 +83,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: if state == "emit" and not _is_empty(line): outputs.extend(_parse_output(subworkflow, line)) if state == "main" and not _is_empty(line): - main_lines.append(line) - + main_lines[workflow_name].append(line) # Check that we have required sections if not len(outputs): subworkflow.failed.append(("main_nf_script_outputs", "No workflow 'emit' block found", subworkflow.main_nf)) @@ -109,18 +119,23 @@ def check_main_section(self, lines, included_components): Checks whether all included components are used and their names are used for `versions.yml`. """ # Check that we have a main section - if len(lines) == 0: - self.failed.append( - ( - "main_section", - "Subworkflow does not contain a main section", - self.main_nf, + for workflow, lines_wrkfl in lines.items(): + if len(lines_wrkfl) == 0: + self.failed.append( + ( + "main_section", + f"Subworkflow {workflow} does not contain a main section", + self.main_nf, + ) ) - ) - return - self.passed.append(("main_section", "Subworkflow does contain a main section", self.main_nf)) - - script = "".join(lines) + return + self.passed.append(("main_section", f"Subworkflow {workflow} does contain a main section", self.main_nf)) + + script = "".join([ + line + for workflow in lines + for line in lines[workflow] + ]) # Check that all included components are used # Check that all included component versions are used From 4d13e6b86bfc47154d95207adc5c3e54bc3bcf98 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Fri, 7 Mar 2025 11:02:31 +0100 Subject: [PATCH 03/23] Update Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da7f58511f..31fb638be0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Fix: linting with comments after the input directive ([#3458](https://github.com/nf-core/tools/pull/3458)) - EDAM ontology fixes ([#3460](https://github.com/nf-core/tools/pull/3460)) - Fix default linting of nf-core components when `nf-core pipelines lint` is ran ([#3480](https://github.com/nf-core/tools/pull/3480)) +- Fix components linting in `nf-core subworkflows lint` with multiple workflows in a `main.nf` ([#3486](https://github.com/nf-core/tools/pull/3486)) ### Modules @@ -39,6 +40,7 @@ - chore(deps): update gitpod/workspace-base docker digest to 7f35e40 ([#3473](https://github.com/nf-core/tools/pull/3473)) - chore(deps): update python:3.12-slim docker digest to aaa3f8c ([#3474](https://github.com/nf-core/tools/pull/3474)) - chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.9 ([#3470](https://github.com/nf-core/tools/pull/3470)) +- Remove duplicated `pdiff` in `requirements.txt` ([#3486](https://github.com/nf-core/tools/pull/3486)) ## [v3.2.0 - Pewter Pangolin](https://github.com/nf-core/tools/releases/tag/3.2.0) - [2025-01-27] From f5b78a84992e6d779f1e136ab209f3d27c83638b Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Fri, 7 Mar 2025 11:04:42 +0100 Subject: [PATCH 04/23] Fix linting --- nf_core/subworkflows/lint/main_nf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index 4630557471..8b3fbd7791 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -48,7 +48,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: state = "subworkflow" subworkflow_lines = [] workflow_lines = [] - main_lines = {} + main_lines : dict[str, list[str]] = {} open_brackets = close_brackets = 0 for line in lines: # Keep track of open and close brackets From 0e4d0141fcb1abfcd161b0299d4994697b717196 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Fri, 7 Mar 2025 11:18:51 +0100 Subject: [PATCH 05/23] Update linting --- nf_core/subworkflows/lint/main_nf.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index 8b3fbd7791..d9c4b99d7a 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -48,7 +48,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: state = "subworkflow" subworkflow_lines = [] workflow_lines = [] - main_lines : dict[str, list[str]] = {} + main_lines: dict[str, list[str]] = {} open_brackets = close_brackets = 0 for line in lines: # Keep track of open and close brackets @@ -131,11 +131,7 @@ def check_main_section(self, lines, included_components): return self.passed.append(("main_section", f"Subworkflow {workflow} does contain a main section", self.main_nf)) - script = "".join([ - line - for workflow in lines - for line in lines[workflow] - ]) + script = "".join([line for workflow in lines for line in lines[workflow]]) # Check that all included components are used # Check that all included component versions are used From 5e02e07f5c871306e7b5721b112438e46891d045 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 15:05:18 +0100 Subject: [PATCH 06/23] Separate pipeline completion --- nf_core/pipeline-template/main.nf | 2 +- .../utils_nfcore_pipeline_completion/main.nf | 85 +++++++++++++++++++ .../utils_nfcore_pipeline_pipeline/main.nf | 78 +---------------- 3 files changed, 90 insertions(+), 75 deletions(-) create mode 100644 nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf diff --git a/nf_core/pipeline-template/main.nf b/nf_core/pipeline-template/main.nf index 70bdc274e2..de50e6c9ee 100644 --- a/nf_core/pipeline-template/main.nf +++ b/nf_core/pipeline-template/main.nf @@ -20,7 +20,7 @@ include { {{ short_name|upper }} } from './workflows/{{ short_name }}' {%- if modules %} include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_{{ short_name }}_pipeline' -include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_{{ short_name }}_pipeline' +include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_pipeline_completion' {%- if igenomes %} include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_{{ short_name }}_pipeline' diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf new file mode 100644 index 0000000000..810d880542 --- /dev/null +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf @@ -0,0 +1,85 @@ +// +// Subworkflow with for pipeline completion +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +{% if nf_schema %} +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { paramsSummaryMap } from 'plugin/nf-schema' +{% endif %} +{%- if email %} +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +{%- endif %} +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +{%- if adaptivecard or slackreport %} +include { imNotification } from '../../nf-core/utils_nfcore_pipeline' +{%- endif %} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW FOR PIPELINE COMPLETION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow PIPELINE_COMPLETION { + + take: + {%- if email %} + email // string: email address + email_on_fail // string: email address sent on pipeline failure + plaintext_email // boolean: Send plain-text email instead of HTML + {%- endif %} + outdir // path: Path to output directory where results will be published + monochrome_logs // boolean: Disable ANSI colour codes in log output + {%- if adaptivecard or slackreport %} + hook_url // string: hook URL for notifications{% endif %} + {%- if multiqc %} + multiqc_report // string: Path to MultiQC report{% endif %} + + main: + {%- if nf_schema %} + summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + {%- else %} + summary_params = [:] + {%- endif %} + + {%- if multiqc %} + def multiqc_reports = multiqc_report.toList() + {%- endif %} + + // + // Completion email and summary + // + workflow.onComplete { + {%- if email %} + if (email || email_on_fail) { + completionEmail( + summary_params, + email, + email_on_fail, + plaintext_email, + outdir, + monochrome_logs, + {% if multiqc %}multiqc_reports.getVal(),{% else %}[]{% endif %} + ) + } + {%- endif %} + + completionSummary(monochrome_logs) + + {%- if adaptivecard or slackreport %} + if (hook_url) { + imNotification(summary_params, hook_url) + } + {%- endif %} + } + + workflow.onError { + log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" + } +} diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf index 06faf35d72..a7c4cebb4e 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf @@ -8,16 +8,10 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -{% if nf_schema %}include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' -include { paramsSummaryMap } from 'plugin/nf-schema' -include { samplesheetToList } from 'plugin/nf-schema'{% endif %} -{%- if email %} -include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' -{%- endif %} -include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' -{%- if adaptivecard or slackreport %} -include { imNotification } from '../../nf-core/utils_nfcore_pipeline' -{%- endif %} +{% if nf_schema %} +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { samplesheetToList } from 'plugin/nf-schema' +{% endif %} include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' @@ -112,70 +106,6 @@ workflow PIPELINE_INITIALISATION { versions = ch_versions } -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SUBWORKFLOW FOR PIPELINE COMPLETION -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -workflow PIPELINE_COMPLETION { - - take: - {%- if email %} - email // string: email address - email_on_fail // string: email address sent on pipeline failure - plaintext_email // boolean: Send plain-text email instead of HTML - {%- endif %} - outdir // path: Path to output directory where results will be published - monochrome_logs // boolean: Disable ANSI colour codes in log output - {%- if adaptivecard or slackreport %} - hook_url // string: hook URL for notifications{% endif %} - {%- if multiqc %} - multiqc_report // string: Path to MultiQC report{% endif %} - - main: - {%- if nf_schema %} - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") - {%- else %} - summary_params = [:] - {%- endif %} - - {%- if multiqc %} - def multiqc_reports = multiqc_report.toList() - {%- endif %} - - // - // Completion email and summary - // - workflow.onComplete { - {%- if email %} - if (email || email_on_fail) { - completionEmail( - summary_params, - email, - email_on_fail, - plaintext_email, - outdir, - monochrome_logs, - {% if multiqc %}multiqc_reports.getVal(),{% else %}[]{% endif %} - ) - } - {%- endif %} - - completionSummary(monochrome_logs) - - {%- if adaptivecard or slackreport %} - if (hook_url) { - imNotification(summary_params, hook_url) - } - {%- endif %} - } - - workflow.onError { - log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" - } -} - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FUNCTIONS From 0e8e694a7fa4f4136f15d4912e8e6a45e1009d33 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 15:05:45 +0100 Subject: [PATCH 07/23] Forbid more than one workflow per main.nf --- nf_core/subworkflows/lint/main_nf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index d9c4b99d7a..ce6c313111 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -47,6 +47,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: # Perform section-specific linting state = "subworkflow" subworkflow_lines = [] + subworkflow_nb = 0 workflow_lines = [] main_lines: dict[str, list[str]] = {} open_brackets = close_brackets = 0 @@ -63,6 +64,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: workflow_name = re.findall(r"workflow\s*(\w*)\s*{", line)[0] main_lines.update({workflow_name: []}) state = "workflow" + subworkflow_nb += 1 if re.search(r"take\s*:", line) and state in ["workflow"]: state = "take" continue @@ -89,6 +91,14 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: subworkflow.failed.append(("main_nf_script_outputs", "No workflow 'emit' block found", subworkflow.main_nf)) else: subworkflow.passed.append(("main_nf_script_outputs", "Workflow 'emit' block found", subworkflow.main_nf)) + + # Check for only one workflow per file + if subworkflow_nb > 1: + subworkflow.failed.append(("main_nf_script_outputs", "More than one 'workflow' block found", subworkflow.main_nf)) + elif subworkflow_nb == 0: + subworkflow.failed.append(("main_nf_script_outputs", "No 'workflow' block found", subworkflow.main_nf)) + else: + subworkflow.passed.append(("main_nf_script_outputs", "One 'workflow' block found", subworkflow.main_nf)) # Check the subworkflow include statements included_components = check_subworkflow_section(subworkflow, subworkflow_lines) From b8b0a32301db58dccd6150957ed55e54ec828e40 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 15:09:00 +0100 Subject: [PATCH 08/23] Update changelog --- CHANGELOG.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c43588d2f..91877987e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Add nf-core template version badges to README ([#3396](https://github.com/nf-core/tools/pull/3396)) - Add Bluesky badge to readme ([#3475](https://github.com/nf-core/tools/pull/3475)) - Run awsfulltest after release, and with dev revision on PRs to master ([#3485](https://github.com/nf-core/tools/pull/3485)) +- Separate `PIPELINE_COMPLETION` in its own file ([#3486](https://github.com/nf-core/tools/pull/3486)) ### Linting @@ -20,33 +21,34 @@ ### Modules -- increase meta index for multiple input channels ([#3463](https://github.com/nf-core/tools/pull/3463)) +- Increase meta index for multiple input channels ([#3463](https://github.com/nf-core/tools/pull/3463)) - Configure the default module repository, branch, and path from environment variables. ([#3481](https://github.com/nf-core/tools/pull/3481)) ### Subworkflows +- Forbid more than one `workflow` block by `main.nf` ([#3486](https://github.com/nf-core/tools/pull/3486)) + ### General -- output passed to write_params_file as Path object ([#3435](https://github.com/nf-core/tools/pull/3435)) -- chore(deps): update python:3.12-slim docker digest to 69ce3ae ([#3433](https://github.com/nf-core/tools/pull/3433)) -- chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.4 ([#3438](https://github.com/nf-core/tools/pull/3438)) -- format name/value with YAML syntax ([#3442](https://github.com/nf-core/tools/pull/3442)) -- chore(deps): update pre-commit hook editorconfig-checker/editorconfig-checker.python to v3.2.0 ([#3446](https://github.com/nf-core/tools/pull/3446)) -- chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.5 ([#3445](https://github.com/nf-core/tools/pull/3445)) -- chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.15.0 ([#3447](https://github.com/nf-core/tools/pull/3447)) +- Output passed to write_params_file as Path object ([#3435](https://github.com/nf-core/tools/pull/3435)) +- Chore(deps): update python:3.12-slim docker digest to 69ce3ae ([#3433](https://github.com/nf-core/tools/pull/3433)) +- Chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.4 ([#3438](https://github.com/nf-core/tools/pull/3438)) +- Format name/value with YAML syntax ([#3442](https://github.com/nf-core/tools/pull/3442)) +- Chore(deps): update pre-commit hook editorconfig-checker/editorconfig-checker.python to v3.2.0 ([#3446](https://github.com/nf-core/tools/pull/3446)) +- Chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.5 ([#3445](https://github.com/nf-core/tools/pull/3445)) +- Chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.15.0 ([#3447](https://github.com/nf-core/tools/pull/3447)) - Update prettier to 3.5.0 ([#3448](https://github.com/nf-core/tools/pull/3448)) -- chore(deps): update python:3.12-slim docker digest to 34656cd ([#3450](https://github.com/nf-core/tools/pull/3450)) +- Chore(deps): update python:3.12-slim docker digest to 34656cd ([#3450](https://github.com/nf-core/tools/pull/3450)) - Remove Twitter from README ([#3454](https://github.com/nf-core/tools/pull/3454)) -- docs: fix contributing link in the main README ([#3459](https://github.com/nf-core/tools/pull/3459)) +- Docs: fix contributing link in the main README ([#3459](https://github.com/nf-core/tools/pull/3459)) - Cleanup: Removed Redundant if Condition ([#3468](https://github.com/nf-core/tools/pull/3468)) -- chore(deps): update gitpod/workspace-base docker digest to 7f35e40 ([#3473](https://github.com/nf-core/tools/pull/3473)) -- chore(deps): update python:3.12-slim docker digest to aaa3f8c ([#3474](https://github.com/nf-core/tools/pull/3474)) -- chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.9 ([#3470](https://github.com/nf-core/tools/pull/3470)) -- chore(deps): update github actions ([#3488](https://github.com/nf-core/tools/pull/3488)) -- chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.0 ([#3492](https://github.com/nf-core/tools/pull/3492)) +- Chore(deps): update gitpod/workspace-base docker digest to 7f35e40 ([#3473](https://github.com/nf-core/tools/pull/3473)) +- Chore(deps): update python:3.12-slim docker digest to aaa3f8c ([#3474](https://github.com/nf-core/tools/pull/3474)) +- Chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.9 ([#3470](https://github.com/nf-core/tools/pull/3470)) +- Chore(deps): update github actions ([#3488](https://github.com/nf-core/tools/pull/3488)) +- Chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.0 ([#3492](https://github.com/nf-core/tools/pull/3492)) - Remove duplicated `pdiff` in `requirements.txt` ([#3486](https://github.com/nf-core/tools/pull/3486)) - ## [v3.2.0 - Pewter Pangolin](https://github.com/nf-core/tools/releases/tag/3.2.0) - [2025-01-27] ### Template From 1674126c320f4b6ebb448a27b4928650eb15627c Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 15:12:46 +0100 Subject: [PATCH 09/23] Remove include --- .../subworkflows/local/utils_nfcore_pipeline_completion/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf index 810d880542..4092ecfd10 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf @@ -9,7 +9,6 @@ */ {% if nf_schema %} -include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' include { paramsSummaryMap } from 'plugin/nf-schema' {% endif %} {%- if email %} From db9abeb71796f5308807bf28018be7dd028ed32e Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 15:27:38 +0100 Subject: [PATCH 10/23] Format file --- nf_core/subworkflows/lint/main_nf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index ce6c313111..640b2d6cd7 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -91,10 +91,12 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: subworkflow.failed.append(("main_nf_script_outputs", "No workflow 'emit' block found", subworkflow.main_nf)) else: subworkflow.passed.append(("main_nf_script_outputs", "Workflow 'emit' block found", subworkflow.main_nf)) - + # Check for only one workflow per file if subworkflow_nb > 1: - subworkflow.failed.append(("main_nf_script_outputs", "More than one 'workflow' block found", subworkflow.main_nf)) + subworkflow.failed.append( + ("main_nf_script_outputs", "More than one 'workflow' block found", subworkflow.main_nf) + ) elif subworkflow_nb == 0: subworkflow.failed.append(("main_nf_script_outputs", "No 'workflow' block found", subworkflow.main_nf)) else: From 4924d78f6aee94ce6ae74f59d60fac2850aa5af7 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 15:34:44 +0100 Subject: [PATCH 11/23] Change include --- .../local/utils_nfcore_pipeline_pipeline/main.nf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf index a7c4cebb4e..cfb7e89f83 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf @@ -8,10 +8,8 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -{% if nf_schema %} -include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' -include { samplesheetToList } from 'plugin/nf-schema' -{% endif %} +{% if nf_schema %}include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { samplesheetToList } from 'plugin/nf-schema'{% endif %} include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' From 706ec6c8fc9c3651a5c0805d6dd05cb33f47886a Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 16:10:08 +0100 Subject: [PATCH 12/23] Fix endif --- .../local/utils_nfcore_pipeline_completion/main.nf | 6 ++++-- .../local/utils_nfcore_pipeline_pipeline/main.nf | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf index 4092ecfd10..e15daaa831 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/main.nf @@ -36,9 +36,11 @@ workflow PIPELINE_COMPLETION { outdir // path: Path to output directory where results will be published monochrome_logs // boolean: Disable ANSI colour codes in log output {%- if adaptivecard or slackreport %} - hook_url // string: hook URL for notifications{% endif %} + hook_url // string: hook URL for notifications + {% endif %} {%- if multiqc %} - multiqc_report // string: Path to MultiQC report{% endif %} + multiqc_report // string: Path to MultiQC report + {% endif %} main: {%- if nf_schema %} diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf index cfb7e89f83..a7c4cebb4e 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf @@ -8,8 +8,10 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -{% if nf_schema %}include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' -include { samplesheetToList } from 'plugin/nf-schema'{% endif %} +{% if nf_schema %} +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { samplesheetToList } from 'plugin/nf-schema' +{% endif %} include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' From 0bac171d9b56da97a7138a85393f607596ab9448 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 16:10:16 +0100 Subject: [PATCH 13/23] Add meta.yml --- .../utils_nfcore_pipeline_completion/meta.yml | 39 +++++++++++++++ .../utils_nfcore_pipeline_pipeline/meta.yml | 48 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml create mode 100644 nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml new file mode 100644 index 0000000000..7ab39406b3 --- /dev/null +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml @@ -0,0 +1,39 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "pipeline_completion" +description: Notify user of pipeline completion +keywords: + - notification + - email + - completion +components: [] +input: + - email: + type: string + description: Email address + - email_on_fail: + type: string + description: Email address sent on pipeline failure + - plaintext_email: + type: boolean + description: Send plain-text email instead of HTML + - outdir: + type: string + description: Path to output directory where results will be published + - monochrome_logs: + type: boolean + description: Disable ANSI colour codes in log output + - hook_url: + type: string + description: Hook URL for notifications + - multiqc_report: + type: string + description: Path to MultiQC report +output: + - dummy_emit: + type: boolean + description: | + Dummy emit to make nf-core subworkflows lint happy +authors: + - "@mirpedrol" +maintainers: + - "@mirpedrol" diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml new file mode 100644 index 0000000000..f08003a501 --- /dev/null +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml @@ -0,0 +1,48 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "pipeline_initialisation" +description: Initialise the pipeline parameters, validate them and prepare the samplesheet +keywords: + - initialisation + - validation + - parameters +components: [] +input: + - version: + type: boolean + description: Display version and exit + - validate_params: + type: boolean + description: Boolean whether to validate parameters against the schema at runtime + - monochrome_logs: + type: boolean + description: Do not use coloured log outputs + - nextflow_cli_args: + type: array + description: List of positional nextflow CLI args + - outdir: + type: string + description: The output directory where the results will be saved + - input: + type: string + description: Path to input samplesheet +output: + - samplesheet: + description: Channel with the samplesheet + structure: + - meta: + type: map + description: Metadata map + - fastq: + type: File + description: Fastq file + pattern: "*.fastq" + - versions: + description: Channel containing software versions file + structure: + - versions.yml: + type: file + description: File containing versions of the software used +authors: + - "@mirpedrol" +maintainers: + - "@mirpedrol" From 15fae9b55f05530896dc35034b0e75605c0b9975 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 16:30:09 +0100 Subject: [PATCH 14/23] Remove duplicate requirements --- requirements-dev.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 04c6372d72..cbf11b6800 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,12 +3,9 @@ myst_parser pytest-cov pytest-datafiles responses -ruff Sphinx sphinx-rtd-theme textual-dev==1.5.1 -types-PyYAML -types-requests types-jsonschema types-Markdown types-PyYAML From 0f0381030b690d7a58fb4f7d7d3bbca48bef4797 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 16:30:22 +0100 Subject: [PATCH 15/23] Change include --- .../local/utils_nfcore_pipeline_pipeline/main.nf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf index a7c4cebb4e..cfb7e89f83 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf @@ -8,10 +8,8 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -{% if nf_schema %} -include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' -include { samplesheetToList } from 'plugin/nf-schema' -{% endif %} +{% if nf_schema %}include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { samplesheetToList } from 'plugin/nf-schema'{% endif %} include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' From 6ce7bd3e496b31ea89f2f125d295e1d6365f9cff Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 19 Mar 2025 16:31:41 +0100 Subject: [PATCH 16/23] Rename meta.yml --- nf_core/pipelines/create/create.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 86ac022772..b697d7a9bd 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -314,6 +314,7 @@ def render_template(self) -> None: rename_files: Dict[str, str] = { "workflows/pipeline.nf": f"workflows/{short_name}.nf", "subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf": f"subworkflows/local/utils_nfcore_{short_name}_pipeline/main.nf", + "subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml": f"subworkflows/local/utils_nfcore_{short_name}_pipeline/meta.yml", } # Set the paths to skip according to customization From aff0e3f3053279033009675321894775635ce551 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 20 Mar 2025 15:42:28 +0100 Subject: [PATCH 17/23] Remove dictionary --- nf_core/pipeline-template/main.nf | 2 +- nf_core/pipelines/create/create.py | 2 ++ nf_core/subworkflows/lint/main_nf.py | 24 +++++++++++------------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/nf_core/pipeline-template/main.nf b/nf_core/pipeline-template/main.nf index de50e6c9ee..8dc55e4dbc 100644 --- a/nf_core/pipeline-template/main.nf +++ b/nf_core/pipeline-template/main.nf @@ -20,7 +20,7 @@ include { {{ short_name|upper }} } from './workflows/{{ short_name }}' {%- if modules %} include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_{{ short_name }}_pipeline' -include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_pipeline_completion' +include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_{{ short_name }}_pipeline_completion' {%- if igenomes %} include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_{{ short_name }}_pipeline' diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index b697d7a9bd..3c065d29f1 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -315,6 +315,8 @@ def render_template(self) -> None: "workflows/pipeline.nf": f"workflows/{short_name}.nf", "subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf": f"subworkflows/local/utils_nfcore_{short_name}_pipeline/main.nf", "subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml": f"subworkflows/local/utils_nfcore_{short_name}_pipeline/meta.yml", + "subworkflows/local/utils_nfcore_pipeline_completion/main.nf": f"subworkflows/local/utils_nfcore_{short_name}_pipeline_completion/main.nf", + "subworkflows/local/utils_nfcore_pipeline_completion/meta.yml": f"subworkflows/local/utils_nfcore_{short_name}_pipeline_completion/meta.yml", } # Set the paths to skip according to customization diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index 640b2d6cd7..f487f6f9a9 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -49,7 +49,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: subworkflow_lines = [] subworkflow_nb = 0 workflow_lines = [] - main_lines: dict[str, list[str]] = {} + main_lines = [] open_brackets = close_brackets = 0 for line in lines: # Keep track of open and close brackets @@ -62,7 +62,6 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: if re.search(r"^\s*workflow\s*\w*\s*{", line) and state == "subworkflow": workflow_name = re.findall(r"workflow\s*(\w*)\s*{", line)[0] - main_lines.update({workflow_name: []}) state = "workflow" subworkflow_nb += 1 if re.search(r"take\s*:", line) and state in ["workflow"]: @@ -85,7 +84,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: if state == "emit" and not _is_empty(line): outputs.extend(_parse_output(subworkflow, line)) if state == "main" and not _is_empty(line): - main_lines[workflow_name].append(line) + main_lines.append(line) # Check that we have required sections if not len(outputs): subworkflow.failed.append(("main_nf_script_outputs", "No workflow 'emit' block found", subworkflow.main_nf)) @@ -131,19 +130,18 @@ def check_main_section(self, lines, included_components): Checks whether all included components are used and their names are used for `versions.yml`. """ # Check that we have a main section - for workflow, lines_wrkfl in lines.items(): - if len(lines_wrkfl) == 0: - self.failed.append( - ( - "main_section", - f"Subworkflow {workflow} does not contain a main section", - self.main_nf, + if len(lines) == 0: + self.failed.append( + ( + "main_section", + "Subworkflow does not contain a main section", + self.main_nf, ) ) - return - self.passed.append(("main_section", f"Subworkflow {workflow} does contain a main section", self.main_nf)) + return + self.passed.append(("main_section", f"Subworkflow does contain a main section", self.main_nf)) - script = "".join([line for workflow in lines for line in lines[workflow]]) + script = "".join(lines) # Check that all included components are used # Check that all included component versions are used From c77dc7c601415c2c609561cf35c1fcf23a68ee04 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 20 Mar 2025 15:44:12 +0100 Subject: [PATCH 18/23] Fix lint code --- nf_core/subworkflows/lint/main_nf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index f487f6f9a9..9f0552085a 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -136,10 +136,10 @@ def check_main_section(self, lines, included_components): "main_section", "Subworkflow does not contain a main section", self.main_nf, - ) ) + ) return - self.passed.append(("main_section", f"Subworkflow does contain a main section", self.main_nf)) + self.passed.append(("main_section", "Subworkflow does contain a main section", self.main_nf)) script = "".join(lines) From 27126893cdfb5df3e9e98aa84bf4b4dcb39d1416 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 20 Mar 2025 15:45:10 +0100 Subject: [PATCH 19/23] Remove workflow name --- nf_core/subworkflows/lint/main_nf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index 9f0552085a..5135dbda65 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -61,7 +61,6 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: state = "subworkflow" if re.search(r"^\s*workflow\s*\w*\s*{", line) and state == "subworkflow": - workflow_name = re.findall(r"workflow\s*(\w*)\s*{", line)[0] state = "workflow" subworkflow_nb += 1 if re.search(r"take\s*:", line) and state in ["workflow"]: From 339184cbd02464377088fda151c81bbc987f80e7 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 20 Mar 2025 15:47:19 +0100 Subject: [PATCH 20/23] Add newline --- nf_core/subworkflows/lint/main_nf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index 5135dbda65..2110354ac2 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -84,6 +84,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: outputs.extend(_parse_output(subworkflow, line)) if state == "main" and not _is_empty(line): main_lines.append(line) + # Check that we have required sections if not len(outputs): subworkflow.failed.append(("main_nf_script_outputs", "No workflow 'emit' block found", subworkflow.main_nf)) From f2bab82c793e266f76f6f154fd7c1fe3fc7e9a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Tue, 25 Mar 2025 21:12:20 +0100 Subject: [PATCH 21/23] Update nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Mir Pedrol --- .../local/utils_nfcore_pipeline_completion/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml index 7ab39406b3..e11aa9d47e 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_completion/meta.yml @@ -34,6 +34,6 @@ output: description: | Dummy emit to make nf-core subworkflows lint happy authors: - - "@mirpedrol" + - "@nf-core-bot" maintainers: - "@mirpedrol" From edface3ffabaf29e0f05ee1c1401cb544563f9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Tue, 25 Mar 2025 21:12:30 +0100 Subject: [PATCH 22/23] Update nf_core/subworkflows/lint/main_nf.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Mir Pedrol --- nf_core/subworkflows/lint/main_nf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/subworkflows/lint/main_nf.py b/nf_core/subworkflows/lint/main_nf.py index 2110354ac2..e3a70a21bd 100644 --- a/nf_core/subworkflows/lint/main_nf.py +++ b/nf_core/subworkflows/lint/main_nf.py @@ -93,7 +93,7 @@ def main_nf(_, subworkflow: NFCoreComponent) -> Tuple[List[str], List[str]]: # Check for only one workflow per file if subworkflow_nb > 1: - subworkflow.failed.append( + subworkflow.warned.append( ("main_nf_script_outputs", "More than one 'workflow' block found", subworkflow.main_nf) ) elif subworkflow_nb == 0: From 1155f530943cea03e3ec709c5ec2d0242fb488b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Tue, 25 Mar 2025 21:15:05 +0100 Subject: [PATCH 23/23] Update nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml --- .../subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml index f08003a501..22740c9866 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/meta.yml @@ -27,7 +27,7 @@ input: description: Path to input samplesheet output: - samplesheet: - description: Channel with the samplesheet + description: Channel with the processed output of the samplesheet structure: - meta: type: map