Skip to content

Use Nextflow's plain values of Channel and Value params - #235

Draft
pinin4fjords wants to merge 1 commit into
nextflow-io:masterfrom
pinin4fjords:refactor/use-params-to-plain-map
Draft

pinin4fjords wants to merge 1 commit into
nextflow-io:masterfrom
pinin4fjords:refactor/use-params-to-plain-map

Conversation

@pinin4fjords

@pinin4fjords pinin4fjords commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

Waiting for a Nextflow release. The Nextflow side (nextflow-io/nextflow#7759, closing nextflow-io/nextflow#7758) is merged, but not in a release yet. This PR sets nextflowVersion = '26.10.0', so it won't build until Nextflow 26.10.0 is out. After that, merging master in (and adjusting the version if the release number differs) should be all it needs.

@nvnieuwk, for your awareness: this is the follow-up to the TODO from #230.

What it does

Nextflow now gives the value each typed Channel and Value param was created from through session.params.toPlainMap(). This PR uses that in validateParameters() and the params summary, and removes nf-schema's own lookup in the config (replaceDataflowParams and its helpers in Common.groovy). Typed params now reach the schema in their declared types and with their script defaults, which the config lookup could not give.

The dataflow tests from #230 are rewritten to use real typed params blocks, and the mocked-session spec (ValidateDataflowParamsTest) is replaced by them.

Open questions

  • Minimum Nextflow version. This raises nf-schema's requirement from 26.04.0 to 26.10.0. Is that OK, or should nf-schema keep supporting older Nextflow? If so, the call could check that toPlainMap() exists and fall back to session.params (no older Nextflow release has typed Channel/Value params).
  • Legacy channel params. A channel assigned to params in the script (params.x = channel.of(...), not declared in a params block) was handled by Validate and print the value of Channel and Value params instead of hanging #230's config lookup but isn't covered by toPlainMap(). Is it fine to drop that case?
  • Changelog. I've put the entry under a new 3.2.0, assuming 3.1.0 goes out before Nextflow 26.10.0. Does that match your plans?

Testing

All 161 tests pass against a local build of Nextflow master (3e6b01d35, which includes nextflow-io/nextflow#7759) published as 26.10.0. With session.params in place of session.params.toPlainMap(), the new tests fail, several by hitting their timeout.

🤖 Generated with Claude Code

…e params

Nextflow 26.10.0 resolves each typed `Channel` and `Value` param to the
value it was created from (`ParamsMap.toPlainMap()`, nextflow-io/nextflow#7759),
so validation and the params summary use that instead of looking the
value up in the config. The tests use typed params blocks.

Requires Nextflow 26.10.0, which is not released yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nvnieuwk

nvnieuwk commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks already! We can come back to this after the release next week 🎉

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants