Closed
Description
Certain CLI parsers, such as FSL's Eddy, implement a rigid formulation where only equal-separated options (--long-option=value
) are accepted and space-separated ones (--long-option value
) are rejected. Pydra implements space-separated options, which are common to short and long option names in modern standards.
Sadly, this complicates specification definition slightly with repetition:
class InputSpec(ShellSpec):
input_image: PathLike = field(
metadata={
"help_string": "input image",
"argstr": "--imain={input_image}",
}
)
...
There is a notion of separator in Pydra's field metadata, but it is used for lists of values.
Maybe we could introduce an option separator (defaults to whitespace if unspecified), such as:
class InputSpec(ShellSpec):
input_image: PathLike = field(
metadata={
"help_string": "input image",
"argstr": "--imain",
"optsep": "=",
}
)
...