Hey, I opened a PR with some changes that should b...
# modules
s
Hey, I opened a PR with some changes that should be ready to merge (but will probably need some discussion). Here is the link: https://github.com/nf-core/modules/pull/7244 Yesterday, I adapted one of the modules in a nfcore-pipeline. Output was declared as
path('.fq.gz')
, but I wanted to use the nextflow variable
meta.id
for more precise output declaration (like this:
path('${meta.id}.fq.gz')
). Similar things have worked before for me on other modules. However, this time I got an error, even tho the declaration matched the output file path. After quite some time I figured out that single- and double quoted behave differently in output declarations and it worked the moment I changed to double-quoted path declaration. There is no standard for this across nf-core modules. I think it should be changed to double-quoted strings in every output declaration (see PR), for the sake of simplicity and better adaptability.
s
<!subteam^S044DU0NG68>
s
Seems reasonable to be consistently using ", don't think there is any issue with that
Btw, do you want to pop over to #github-invitations and get invited to the organisation
๐Ÿ‘ 1
m
I usually go for double quotes when I need, and by default I use single.
but I love consistency
this 1
j
I agree it makes sense to set a standard, could you also open an issue to nf-core/tools so we can add linting for this if it gets merged? thanks ๐Ÿ™‚
s
maybe also in language server ?
party this 1
m
I'd rather we solve this trough language server indeed
(and auto linting when we get it)
s
Now this is the kind of PR that I just want to merge without worrying about the tests ๐Ÿ˜‰
๐ŸŽ‰ 1
Because I know there is almost 0 chance that all these modules will pass the tests
s
So, where should I raise an issue on this?
nf-core/tools
repo or somewhere else?
s
Done! If there's anything more to do, I'm happy to help
Alright, so what would be the next steps for this <!subteam^S044DU0NG68>? Happy new year everybody
j
Seems like everyone's on board, so I'll just add a note of dissent for balance ๐Ÿ˜‰ . Much as I enjoy the rules-based order I'm not 100% convinced on this one. It's a pretty standard thing in scripting/ programming in general that things in double quotes are interpreted, things in single quotes aren't. This isn't a specific Nextflow/ nf-core thing. I worry that enforcing standards at this level could just get a little frustrating.
๐Ÿ‘ 1
๐Ÿ‘๐Ÿป 1
j
Yeah I agree with @Jonathan Manning - if there isn't a specific opinion/best practice at the Nextflow level which could be solved with a language server error/warning, I wouldn't make a rule aobut it.
s
Fair enough @Jonathan Manning, too much standards can be overwhelming, and nf-core already has quite some of them ๐Ÿ˜… I just thought especially non-programming experts may not always be aware of the differences in interpretation. But I guess it's negligible since it doesn't cause a lot of problems
๐Ÿ‘ 1
m
It's quite common in many languages that double quoted strings support interpolation, while single quoted ones don't. i.e.
'${meta.id}.fq.gz'
is a literal string with a dollar and curly braces in it.
๐Ÿ‘ 1