-
Notifications
You must be signed in to change notification settings - Fork 762
Allow collection-type params to be loaded from files #6675
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
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
christopher-hakkaart
left a comment
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.
Docs look good. No comments.
jorgee
left a comment
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 been testing with other standard library objects, and it is working with Set and List, but not with Bag, IterableandMap`.
- It is not possible to cast the
ArrayListobject returned by the slurpers to a Bag. I think it should be supported as in the documentation clearly says thatBagis aCollection. Iterableis a superinterface ofCollectionMapis not aCollection, but there is a direct mapping of YAML and JSON files with Maps.
Not sure if it was the goal of the PR to support all the types, but I see it is possible with very little changes. I have created #6676 to support all these types.
|
Thanks Jorge. I intentionally did not support Iterable and Map because I'm not sure about those cases yet. But I did intend to support Bag so thank you for catching that |
|
@pditommaso the bump of Netty version is producing failures in azure tests |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
2fc2409 to
232387b
Compare
This PR adds the ability to declare a param as a collection type:
params { input: List<Map> } workflow { println params.input*.id.join(',') }And supply a CSV, JSON, or YAML file at runtime:
Nextflow interprets the string as a file path and attempts to load the file contents based on the file extension. A runtime error is reported if the file contents are not compatible with the declared type.
Future work will extend the type validation with record types.
(spun off from #6574)