Schema validation parses string incorrectly if they're quoted integers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with nf-core pipelines schema build using a string parameter set to '3', then trace the schema-build validation and default-value handling. The fix is done when quoted numeric config values remain strings and the generated schema emits the default as a string rather than an integer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100