-
Notifications
You must be signed in to change notification settings - Fork 634
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
Add option to ignore process selector warnings #2700
Comments
Think it should be possible to detect the name of the process without adding a special notation, but only one without nested notation. I mean for example Could that be a solution for you ? nextflow/modules/nextflow/src/main/groovy/nextflow/script/ScriptMeta.groovy Lines 214 to 231 in 6930408
|
Do you mean by changing this line in the pipeline configuration from The nested notation is quite important when re-using modules in the pipeline and applying different parameters / publishing options. Be good to factor this in when ignoring the warnings. |
Yeah, the main problem is that it can be detected the process name even if they are within a branch not executed, but not for the fully qualified name, which requires the evaluation of that piece of code. |
Hmmm...I see your point 🤔 |
The fully qualified names are where these warnings come in most useful e.g. if you change the name of a sub-workflow or some nesting then the warnings gets you back on the right track. If we use just the process name and change a fully qualified path to a module then we won't get a warning anymore? |
what about adding an option to switch it off this check. At the end is only meant to be useful for development |
Sounds good in principle but sometimes users may use the pipeline with a certain set of params which show the warning that may have been missed by the developers. How do you propose adding it and would it be off by default? Having an on/off option would definitely be a good start but maybe not the best longer term option? |
It's also useful for users who mis-spell selector names when providing a custom config to override settings. It would be preferable not to have the warnings disabled. Although I do agree that the need for if's in the config is unpleasant. Could those particular warnings be shifted to the log only as long the components ( between : ) of the fully qualified name all belong to either process or workflow namespace? |
I've committed 814a260 that adds the ability to disable the config process names adding in the config
Think this can be a quick solution.
Not sure to fully understand the logic. If you can provide an example it may help |
My initial thought was something like:
where Now I realize that it won't work though because the selector is a pattern, so one needs to deal with stuff like
etc. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@drpatelh is this still relevant? |
Nope. I think the config option you added should suffice given that the configuration is going to be updated in future iterations of the DSL anyway. Just done a little testing and we could switch this off by default in the top-level of the nextflow.enable.configProcessNamesValidation = false
profiles {
devel { nextflow.enable.configProcessNamesValidation = true }
} |
Warnings are great to let developers know that they are using the correct process selectors e.g. here. However, if we are using
if/else
type logic in the main workflow like here then we have to replicate this in any configuration too like here. This becomes quite painful to maintain and ideally we should have an option to turn off the warnings via some sort of configuration option.Possible suggestions:
ignore_selector_warnings = ['KUNG', 'FOO', 'BAR']
process
scope for all processes or individual ones:The text was updated successfully, but these errors were encountered: