cwl_utils.graph_split
Unpacks the result of cwltool –unpack.
Only tested with a single v1.0 workflow.
Attributes
Functions
Build the argument parser. |
|
|
Console entry point. |
|
Split the packed CWL at the path of the first argument. |
|
Loop over the provided packed CWL document and split it up. |
|
|
|
Rewrite the given element from the CWL $graph. |
|
Adjust the $import directive. |
|
Clean up the names of the types. |
|
Dump the schemadefs to their own file. |
|
Output object as JSON. |
|
Output object as YAML. |
Module Contents
- cwl_utils.graph_split.stringify_dict: Callable[[dict[str, Any]], str] | None
- cwl_utils.graph_split.defaultStreamHandler
- cwl_utils.graph_split.arg_parser()
Build the argument parser.
- Return type:
argparse.ArgumentParser
- cwl_utils.graph_split.main()
Console entry point.
- Return type:
None
- cwl_utils.graph_split.run(args)
Split the packed CWL at the path of the first argument.
- Parameters:
args (list[str])
- Return type:
int
- cwl_utils.graph_split.graph_split(sourceIO, output_dir, output_format, mainfile, pretty)
Loop over the provided packed CWL document and split it up.
- Parameters:
sourceIO (IO[str])
output_dir (pathlib.Path)
output_format (str)
mainfile (str)
pretty (bool)
- Return type:
None
- cwl_utils.graph_split.rewrite_id(entry, this_id)
- Parameters:
entry (Any)
this_id (str | None)
- Return type:
collections.abc.MutableMapping[Any, Any] | str
- cwl_utils.graph_split.rewrite(document, doc_id, output_dir, pretty=False)
Rewrite the given element from the CWL $graph.
- Parameters:
document (Any)
doc_id (str)
output_dir (pathlib.Path)
pretty (bool)
- Return type:
set[str]
- cwl_utils.graph_split.rewrite_import(document)
Adjust the $import directive.
- Parameters:
document (collections.abc.MutableMapping[str, Any])
- Return type:
None
- cwl_utils.graph_split.rewrite_types(field, entry_file, sameself)
Clean up the names of the types.
- Parameters:
field (Any)
entry_file (str)
sameself (bool)
- Return type:
None
- cwl_utils.graph_split.rewrite_schemadef(document, output_dir, pretty=False)
Dump the schemadefs to their own file.
- Parameters:
document (collections.abc.MutableMapping[str, Any])
output_dir (pathlib.Path)
pretty (bool)
- Return type:
set[str]
- cwl_utils.graph_split.json_dump(entry, output_file)
Output object as JSON.
- Parameters:
entry (Any)
output_file (pathlib.Path)
- Return type:
None
- cwl_utils.graph_split.yaml_dump(entry, output_handle, pretty)
Output object as YAML.
- Parameters:
entry (Any)
output_handle (io.TextIOWrapper)
pretty (bool)
- Return type:
None