cwl_utils.parser.cwl_v1_1_utils
Attributes
Functions
|
Check for identical type specifications, ignoring extra keys like inputBinding. |
|
Given a list of sinks, check if their types match with the types of their sources. |
|
Check if the source and sink types are correct. |
Read file content up to 64 kB as a byte array. |
|
Read file content up to 64 kB as an utf-8 encoded string. |
|
Convert stdin, stdout and stderr type shortcuts to files. |
|
|
Load a CWL v1.1 input file from a serialized YAML string or a YAML object. |
|
Load a CWL v1.1 input file from a serialized YAML string. |
|
Load a CWL v1.1 input file from a YAML object. |
|
Return the merge flattened type of the source type. |
|
Determine the type for the given step input. |
|
Determine the type for the given step output. |
|
Determine the type for the given sourcenames. |
|
Find the process input parameter that matches one of the given sourcenames. |
Module Contents
- cwl_utils.parser.cwl_v1_1_utils.SrcSink
- cwl_utils.parser.cwl_v1_1_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.cwl_v1_1_utils.check_all_types(src_dict, sinks, type_dict)
Given a list of sinks, check if their types match with the types of their sources.
- Parameters:
src_dict (Dict[str, Any])
sinks (MutableSequence[Union[cwl_utils.parser.cwl_v1_1.WorkflowStepInput, cwl_utils.parser.cwl_v1_1.WorkflowOutputParameter]])
type_dict (Dict[str, Any])
- Return type:
Dict[str, List[SrcSink]]
- cwl_utils.parser.cwl_v1_1_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.cwl_v1_1_utils.content_limit_respected_read_bytes(f)
Read file content up to 64 kB as a byte array.
Truncate content for larger files.
- cwl_utils.parser.cwl_v1_1_utils.content_limit_respected_read(f)
Read file content up to 64 kB as an utf-8 encoded string.
Truncate content for larger files.
- cwl_utils.parser.cwl_v1_1_utils.convert_stdstreams_to_files(clt)
Convert stdin, stdout and stderr type shortcuts to files.
- Parameters:
- Return type:
None
- cwl_utils.parser.cwl_v1_1_utils.load_inputfile(doc, baseuri=None, loadingOptions=None)
Load a CWL v1.1 input file from a serialized YAML string or a YAML object.
- Parameters:
doc (Any)
baseuri (Optional[str])
loadingOptions (Optional[cwl_utils.parser.cwl_v1_1.LoadingOptions])
- Return type:
Any
- cwl_utils.parser.cwl_v1_1_utils.load_inputfile_by_string(string, uri, loadingOptions=None)
Load a CWL v1.1 input file from a serialized YAML string.
- Parameters:
string (Any)
uri (str)
loadingOptions (Optional[cwl_utils.parser.cwl_v1_1.LoadingOptions])
- Return type:
Any
- cwl_utils.parser.cwl_v1_1_utils.load_inputfile_by_yaml(yaml, uri, loadingOptions=None)
Load a CWL v1.1 input file from a YAML object.
- Parameters:
yaml (Any)
uri (str)
loadingOptions (Optional[cwl_utils.parser.cwl_v1_1.LoadingOptions])
- Return type:
Any
- cwl_utils.parser.cwl_v1_1_utils.merge_flatten_type(src)
Return the merge flattened type of the source type.
- Parameters:
src (Any)
- Return type:
Any
- cwl_utils.parser.cwl_v1_1_utils.type_for_step_input(step, in_)
Determine the type for the given step input.
- Parameters:
- Return type:
Any
- cwl_utils.parser.cwl_v1_1_utils.type_for_step_output(step, sourcename)
Determine the type for the given step output.
- Parameters:
sourcename (str)
- Return type:
Any
- cwl_utils.parser.cwl_v1_1_utils.type_for_source(process, sourcenames, parent=None, linkMerge=None)
Determine the type for the given sourcenames.
- Parameters:
process (Union[cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_1.ExpressionTool])
parent (Optional[cwl_utils.parser.cwl_v1_1.Workflow])
linkMerge (Optional[str])
- Return type:
Any
- cwl_utils.parser.cwl_v1_1_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 (Union[cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_1.ExpressionTool])
parent (Optional[cwl_utils.parser.cwl_v1_1.Workflow])
- Return type:
Union[List[cwl_utils.parser.cwl_v1_1.WorkflowInputParameter], cwl_utils.parser.cwl_v1_1.WorkflowInputParameter]