cwl_utils.parser.utils
CWL parser utility functions.
Functions
|
Check for identical type specifications, ignoring extra keys like inputBinding. |
|
Check if the source and sink types are correct. |
|
Convert stdin, stdout and stderr type shortcuts to files. |
|
Load a CWL input file from a URI or a path. |
|
Load a CWL input file from a serialized YAML string or a YAML object. |
|
Load a CWL input file from a serialized YAML string. |
|
Load a CWL input file from a YAML object. |
|
|
|
Return the merge flattened type of the source type. |
|
Find the process input parameter that matches one of the given sourcenames. |
|
Check if all source and sink types of a workflow are compatible before run time. |
|
Determine the type for the given sourcenames. |
|
Determine the type for the given step output. |
|
Determine the type for the given step output. |
Module Contents
- cwl_utils.parser.utils.can_assign_src_to_sink(src, sink, strict=False)
Check for identical type specifications, ignoring extra keys like inputBinding.
src: admissible source types sink: admissible sink types
In non-strict comparison, at least one source type must match one sink type, except for ‘null’. In strict comparison, all source types must match at least one sink type.
- cwl_utils.parser.utils.check_types(srctype, sinktype, linkMerge, valueFrom=None)
Check if the source and sink types are correct.
Acceptable types are “pass”, “warning”, or “exception”.
- cwl_utils.parser.utils.convert_stdstreams_to_files(process)
Convert stdin, stdout and stderr type shortcuts to files.
- Parameters:
process (cwl_utils.parser.Process)
- Return type:
None
- cwl_utils.parser.utils.load_inputfile_by_uri(version, path, loadingOptions=None)
Load a CWL input file from a URI or a path.
- Parameters:
version (str)
path (str | pathlib.Path)
loadingOptions (cwl_utils.parser.LoadingOptions | None)
- Return type:
Any
- cwl_utils.parser.utils.load_inputfile(version, doc, baseuri=None, loadingOptions=None)
Load a CWL input file from a serialized YAML string or a YAML object.
- Parameters:
version (str)
doc (Any)
baseuri (str | None)
loadingOptions (cwl_utils.parser.LoadingOptions | None)
- Return type:
Any
- cwl_utils.parser.utils.load_inputfile_by_string(version, string, uri, loadingOptions=None)
Load a CWL input file from a serialized YAML string.
- Parameters:
version (str)
string (str)
uri (str)
loadingOptions (cwl_utils.parser.LoadingOptions | None)
- Return type:
Any
- cwl_utils.parser.utils.load_inputfile_by_yaml(version, yaml, uri, loadingOptions=None)
Load a CWL input file from a YAML object.
- Parameters:
version (str)
yaml (Any)
uri (str)
loadingOptions (cwl_utils.parser.LoadingOptions | None)
- Return type:
Any
- cwl_utils.parser.utils.load_step(step)
- Parameters:
- Return type:
- cwl_utils.parser.utils.merge_flatten_type(src)
Return the merge flattened type of the source type.
- Parameters:
src (Any)
- Return type:
Any
- cwl_utils.parser.utils.param_for_source_id(process, sourcenames, parent=None, scatter_context=None)
Find the process input parameter that matches one of the given sourcenames.
- Parameters:
process (cwl_utils.parser.Process)
parent (cwl_utils.parser.Workflow | None)
- Return type:
cwl_utils.parser.CommandInputParameter | cwl_utils.parser.CommandOutputParameter | cwl_utils.parser.WorkflowInputParameter | collections.abc.MutableSequence[cwl_utils.parser.CommandInputParameter | cwl_utils.parser.CommandOutputParameter | cwl_utils.parser.WorkflowInputParameter]
- cwl_utils.parser.utils.static_checker(workflow)
Check if all source and sink types of a workflow are compatible before run time.
- Parameters:
workflow (cwl_utils.parser.Workflow)
- Return type:
None
- cwl_utils.parser.utils.type_for_source(process, cwlVersion, sourcenames, parent=None, linkMerge=None, pickValue=None)
Determine the type for the given sourcenames.
- Parameters:
process (cwl_utils.parser.Process)
cwlVersion (Literal['v1.0', 'v1.1', 'v1.2'])
parent (cwl_utils.parser.Workflow | None)
linkMerge (str | None)
pickValue (str | None)
- Return type:
Any
- cwl_utils.parser.utils.type_for_step_input(step, in_, cwlVersion)
Determine the type for the given step output.
- Parameters:
cwlVersion (str)
- Return type:
Any