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 😁 |
ewels
left a comment
There was a problem hiding this comment.
Got to Headers.groovy and submitting early for discussion..
|
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 ! |
ewels
left a comment
There was a problem hiding this comment.
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 👍🏻
apeltzer
left a comment
There was a problem hiding this comment.
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
devinstead ofdsl2_template