From 39441813865c1ff480951c2dcbafef897a5eaaa5 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Thu, 17 Aug 2023 13:34:42 +0200 Subject: [PATCH 1/2] warning when custom workflow name contains special characters --- nf_core/create.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nf_core/create.py b/nf_core/create.py index 08b9676c9c..470623f551 100644 --- a/nf_core/create.py +++ b/nf_core/create.py @@ -187,10 +187,15 @@ def create_param_dict(self, name, description, author, version, template_yaml_pa and "manifest.name" in config_yml["lint"]["nextflow_config"] ): return param_dict, skip_paths, template_yaml - if param_dict["prefix"] == "nf-core": - # Check that the pipeline name matches the requirements - if not re.match(r"^[a-z]+$", param_dict["short_name"]): + + # Check that the pipeline name matches the requirements + if not re.match(r"^[a-z]+$", param_dict["short_name"]): + if param_dict["prefix"] == "nf-core": raise UserWarning("[red]Invalid workflow name: must be lowercase without punctuation.") + else: + log.warning( + "Your workflow name is not lowercase without punctuation. This may cause Nextflow errors.\nConsider changing the name to avoid special characters." + ) return param_dict, skip_paths, template_yaml From 9569144238c105d98df4ba65510b5f0f0c77cf6d Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Thu, 17 Aug 2023 13:38:52 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93adaa6248..216f196fe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - Add a `create-params-file` command to create a YAML parameter file for a pipeline containing parameter documentation and defaults. ([#2362](https://github.com/nf-core/tools/pull/2362)) - Update the Code of Conduct ([#2381](https://github.com/nf-core/tools/pull/2381)) - Remove `--no-git` option from `nf-core create` ([#2394](https://github.com/nf-core/tools/pull/2394)) +- Throw warning when custom workflow name contains special characters ([#2401](https://github.com/nf-core/tools/pull/2401)) # [v2.9 - Chromium Falcon](https://github.com/nf-core/tools/releases/tag/2.9) + [2023-06-29]