From 38ea56804aad6a0bd4492b55e164af42f1bac758 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 2 Aug 2024 10:10:19 +0200 Subject: [PATCH 1/3] allow numbers in custom pipeline name --- nf_core/pipelines/create/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipelines/create/utils.py b/nf_core/pipelines/create/utils.py index c15d61e266..a360b5f3a9 100644 --- a/nf_core/pipelines/create/utils.py +++ b/nf_core/pipelines/create/utils.py @@ -65,7 +65,7 @@ def name_nospecialchars(cls, v: str, info: ValidationInfo) -> str: if not re.match(r"^[a-z]+$", v): raise ValueError("Must be lowercase without punctuation.") else: - if not re.match(r"^[a-zA-Z-_]+$", v): + if not re.match(r"^[a-zA-Z-_0-9]+$", v): raise ValueError("Must not contain special characters. Only '-' or '_' are allowed.") return v From 8a781b8bcb3f5bc40e67819ee3e03fe774e14a9a Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 2 Aug 2024 08:12:16 +0000 Subject: [PATCH 2/3] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec033ff1ee..b6cd12d551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ - Fix number of arguments for pipelines_create within the command_create function ([#3074](https://github.com/nf-core/tools/pull/3074)) - Update python:3.12-slim Docker digest to 740d94a ([#3079](https://github.com/nf-core/tools/pull/3079)) - Update pre-commit hook pre-commit/mirrors-mypy to v1.11.1 ([#3091](https://github.com/nf-core/tools/pull/3091)) +- Pipelines: allow numbers in custom pipeline name ([#3094](https://github.com/nf-core/tools/pull/3094)) ## [v2.14.1 - Tantalum Toad - Patch](https://github.com/nf-core/tools/releases/tag/2.14.1) - [2024-05-09] From 5b7425368135301c53f664262133bf84981cbdd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 2 Aug 2024 15:34:20 +0200 Subject: [PATCH 3/3] Update nf_core/pipelines/create/utils.py Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --- nf_core/pipelines/create/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipelines/create/utils.py b/nf_core/pipelines/create/utils.py index a360b5f3a9..c387960c39 100644 --- a/nf_core/pipelines/create/utils.py +++ b/nf_core/pipelines/create/utils.py @@ -65,7 +65,7 @@ def name_nospecialchars(cls, v: str, info: ValidationInfo) -> str: if not re.match(r"^[a-z]+$", v): raise ValueError("Must be lowercase without punctuation.") else: - if not re.match(r"^[a-zA-Z-_0-9]+$", v): + if not re.match(r"^[-\w]+$", v): raise ValueError("Must not contain special characters. Only '-' or '_' are allowed.") return v