Skip to content

Fix type detection of CLI params in v2 config parser#6765

Open
bentsherman wants to merge 1 commit intomasterfrom
fix-config-param-cli-type-detection
Open

Fix type detection of CLI params in v2 config parser#6765
bentsherman wants to merge 1 commit intomasterfrom
fix-config-param-cli-type-detection

Conversation

@bentsherman
Copy link
Member

@bentsherman bentsherman commented Jan 27, 2026

Spun off from #6760 (comment)

This PR applies the CLI type detection from the params block to also work with config params. When a CLI param overrides a config param, the CLI param is converted to the appropriate type based on the default param value in the config.

Type annotations can't be specified in the config like they can in the script, but we can almost always infer the intended type from the default value:

params.igenomes_ignore = false      // Boolean
params.max_cpus = 4                 // Integer
params.publish_mode = 'copy'        // String
params.config_profile_name = null   // (assume String)

Without this, users would have to assume that all config params are strings and convert them appropriately. But with this PR I think we can recover all of the functionality of the legacy type detection that users rely on, and even make it a bit more robust.

@ewels let me know if this change makes sense

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@netlify
Copy link

netlify bot commented Jan 27, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 6cc4a72
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/697906e061d4da000859c375

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant