Skip to content

Schema validation parses string incorrectly if they're quoted integers #4367

Description

@CormacKinsella

Description of the bug

In my pipeline config I declare a string parameter whose value is numeric (the downstream tool can also accept non-numeric strings):

nstreams = '3'

nf-core pipelines schema build resolves the config value as an integer rather than a string:

✨ Default for 'params.nstreams' in the pipeline config does not match schema. (schema: '<class 'str'>: 3' | config: '<class 'int'>: 3'). Update pipeline schema? [y/n]: y

config: '<class 'int'>: 3' - string is being treated as an integer

Another related thing in the schema:

        "nstreams": {
          "type": "string",
          "default": 3,
          "description": "Number of streams per GPU: applied when gpu_low_memory is false; 'auto' overrides several settings based on GPU and host memory, else INT to set manually"
        },

This also reads as incorrect to me, 3 should be "3", but when I manually correct this and re-run schema build, it reverts.

Command used and terminal output

See above for command and output.

System information

Nextflow version: 25.10.2
Hardware: Desktop
Executor: local
OS: Ubuntu 24.04.4 LTS
Version of nf-core/tools: 4.0.2
Python version: 3.14.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions