How can I have the default value of a string param...
# nf-schema
s
How can I have the default value of a string parameter be just a single space? There seems to be some internal stripping going on causing the parameter value to appear empty which in turn causes it to fail
nf-core pipelines lint
(Default parameters are invalid: '' should be non-empty)
n
Do you have a PR I can take a look at?
s
No, this is just a general question
n
I'm not sure, the issue could either be in nf-schema, Nextflow or nf-core tooling. I'll need more information to give a better answer 😁
It's definitely not expected behaviour
a
I'm tempted to say the problem is with
lint
but I don't know for sure. I'm currently on a holiday but it should be simple to set up an mvp to check which stage this is occurring. A simple workflow that does
println "${<http://params.space|params.space>}"
Then run it with: • just set the default value in config as
" "
• a default set in schema and using nf-schema If these both print a space as intended then the issue would appear to lie in the tooling
I am fairly confident this is a tooling issue
Copy code
if isinstance(param["default"], str) and param["default"].strip() == "":
            param["default"] = ""
            return param
This is the code that
tools
uses when it sanitises the defaults
❤️ 1
n
Thanks for the investigation Arthur! This looks like a #CE5LG7WMB issue indeed