Allow collection-type params to be loaded from files#6675
Merged
bentsherman merged 2 commits intomasterfrom Dec 19, 2025
Merged
Allow collection-type params to be loaded from files#6675bentsherman merged 2 commits intomasterfrom
bentsherman merged 2 commits intomasterfrom
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
christopher-hakkaart
approved these changes
Dec 18, 2025
Collaborator
christopher-hakkaart
left a comment
There was a problem hiding this comment.
Docs look good. No comments.
jorgee
reviewed
Dec 19, 2025
Contributor
jorgee
left a comment
There was a problem hiding this comment.
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.
Member
Author
|
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 |
Contributor
|
@pditommaso the bump of Netty version is producing failures in azure tests |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
2fc2409 to
232387b
Compare
jorgee
approved these changes
Dec 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)