Naming conventions for NXF scripts #9
Comments
I'm just not comfortable with the underscore, as it seems not used much in groovy. I think the most important point for the But yeah, something to differentiate plain variables and channels should be a good start. For the process, I think it's expected that they begin with an uppercase, but apart from that, I think the name should be as descriptive as possible, I usually go with |
I don't really care about this too much 😛 Here especially - the
Agreed, that was a key point that's missing above. So |
I have to say that I personally enjoy the I also don't know whether we want to make things like this mandatory or just suggest to people to follow these rules as a suggestion. My feeling is to make it mandatory since that would improve overall interoperability, but that might be too harsh in the short/mid-term. |
I really like the ide about being specific about the channel names etc. I.e. anding the |
If that can be useful, please find attached the modified version of your RNA-seq pipeline which includes renaming of channels. It's mostly a stripped-down version so nothing crazy on the code, but that may illustrate how channels renaming improves readability. PS: "help message not up to date in this version" |
I really like it that way - its easy to see, you know exactly what a channel "contains" and what it will be used for. |
But then we should also be consistent with the process names as well, right? For example:
would result in channel names like:
well, don't even know how to do it properly here. Maybe: Could be easily checked via a regex in the lint tests. |
we could stick to process names like: |
Here my two cents:
Andreas |
I am with you here, you can however check it and print it as warning. Like PEP guidelines i.e., if, and only if, we can agree to a standard :)
Maybe this issue points out, that we all have different taste and work practices (regarding the ideas here) and there is no strong "right" or "wrong". Maybe we can just agree to add the 'ch_' prefix for now and continue with CI and wf tests, which imho is more important than naming conventions ;) |
+1 for a recommendation that isn't enforced, or at least explain what not to do. Sometimes there is a more intuitive name that is unlikely to name clash yet does not include the process' name. My main reason for including the process name in the channel name is to avoid name clashes. But I also divide my |
@timdiels - surely this doesn't need to be mutually exclusive though? You can still do all of those things with an additional |
@ewels - I misunderstood, I thought the idea was to enforce something like |
No, on re-reading it's the discussion of two points I guess 👍 So yes, basically I agree with you :) |
I'm very late to the discussion, but I somehow developed my own style (I was unaware of this discussion) which turns out to be very similar to @sven1103 proposal above. I tend to name processes as |
This issue was moved to nf-core/tools#80 |
After the discussion in the NGI-RNASeq Gitter (credits to @rfenouil ), we might want to set some standards for naming e.g. channels/processes/variables. I opened this ticket to keep track of the ideas and we could maybe integrate these soon to make them mandatory once we agreed on defaults:
Some ideas:
ch_
prefix (to hinder confusing them with variables)Other suggestions/ideas for variable / process / ... naming conventions would be great too!
The text was updated successfully, but these errors were encountered: