-
Notifications
You must be signed in to change notification settings - Fork 192
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
parameter validation for dev branch #852
Conversation
Looks good to me - maybe two things:
All of these have been added to eager already and work very well together with the validation and since we're now taking the effort to backporting this to DSLv1 template (and later to DSLv2 of course), would make sense to keep this already in line with the DSLv2 branch no? |
And what Phil mentioned #817 (comment) |
Yes thought about that - might as well do it now 👍 Okay suggestions for the magic jar file are still up for grabs 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got to Headers.groovy
and submitting early for discussion..
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Checks.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Checks.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Checks.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Checks.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Checks.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Completion.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Completion.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Completion.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Completion.groovy
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/lib/Completion.groovy
Outdated
Show resolved
Hide resolved
Just pushed a commit 3cfeea3 to the PR that makes the error output a little friendlier.. Instead of:
It now prints:
|
* Nicer log messages for missing required params * Show unexpected params if we get a validation error * New params.schema_ignore_params to allow unexpected params that are not in the schema * Show param value when there's a validation error with a specific param * Set --input to null in nextflow.config as we can now catch missing required params before the channel is set up
Ok, made a few more changes:
Absolutely loving how well this works, going to be an absolute game changer ✨ |
Ah I broke linting with the new parameter. Will take a look ASAP - I think it probably makes sense to get the linting to handle this and ignore it (and any other params it mentions). And probably add some docs. |
Remove useage of custom run name with --name
Some more improvements:
Looking pretty fly! 🚀 |
Allows validation code to allow named parameters to not be present in the pipeline schema
Ok, final change that I can think of - just added I'm hoping that this should fix the CI tests. |
This comment has been minimized.
This comment has been minimized.
Wow, awesome, thanks a lot! Cool so all that's left to do is adding the remaining parameters to the schema, right? I'll do that now and then I think we're pretty much there unless you have some more ideas :) |
Okay saw that you put the Currently we are reporting unexpected params twice, directly when found and when the workflow fails. |
Sounds good to keep both I think. Seeing it from a user perspective, its very useful to get some feedback on failure, e.g. "these parameters have been set but shouldn't be" - especially good for beginners, as they might then start thinking about this and/or provide this when asking for help :-) |
As nobody did it on paolos request on twitter, I thought maybe start the discussion over there: nextflow-io/nextflow#1893 Didn't want to win your laurels on that one, instead just wanted to make sure there is a follow up and we don't forget about it / delay it any further 👍🏻 |
Awesome thanks @apeltzer ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review is now a little pointless and I have pushed several commits to this PR now so am kind of a co-author. But I'm happy with this, I think it's good to be merged 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested all of the functionality in the linked PR on eager and things worked fine for me 🎉 happy for this to get merged :-)
New PR to merge parameter validation into
dev
instead ofdsl2_template