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

Disalow dashes (-) in custom pipeline names #2366

Closed
matthdsm opened this issue Jul 7, 2023 · 2 comments
Closed

Disalow dashes (-) in custom pipeline names #2366

matthdsm opened this issue Jul 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@matthdsm
Copy link
Contributor

matthdsm commented Jul 7, 2023

Description of the bug

The inclusion of a dash in a custom pipeline name causes all kinds of syntax errors in the generated files because Groovy/Nextflow can't parse words with dashes as variable names.

So we need to either disallow dashes or parse the name and replace them by underscores during template generation/sync

Command used and terminal output

nf-core create --name 'something-with-a-dash'

System information

No response

@matthdsm matthdsm added the bug Something isn't working label Jul 7, 2023
@mirpedrol
Copy link
Member

There are several custom pipelines which already contain dashes, that's the reason why we decided to allow them in unbranded pipelines. Otherwise, this breaks other commands such as sync for these pipelines.
However, it is not recommended to use dashes as you mention, we don't allow dashes when the name is introduced by a CLI prompt to discourage this behaviour, so only creating a new pipeline with a template.yml file will work.
Maybe adding a warning in such cases discouraging the use of dashes will improve the situation?

@matthdsm
Copy link
Contributor Author

Agreed, short of a fix, a warning would be nice.
Thanks!
M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants