cwl_utils.graph_split

Unpacks the result of cwltool –unpack.

Only tested with a single v1.0 workflow.

Module Contents

Functions

arg_parser()

Build the argument parser.

main()

Console entry point.

run(args)

Split the packed CWL at the path of the first argument.

graph_split(sourceIO, output_dir, output_format, ...)

Loop over the provided packed CWL document and split it up.

rewrite(document, doc_id)

Rewrite the given element from the CWL $graph.

rewrite_import(document)

Adjust the $import directive.

rewrite_types(field, entry_file, sameself)

Clean up the names of the types.

rewrite_schemadef(document)

Dump the schemadefs to their own file.

json_dump(entry, output_file)

Output object as JSON.

yaml_dump(entry, output_file, pretty)

Output object as YAML.

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 (_typeshed.StrPath) –

  • output_format (str) –

  • mainfile (str) –

  • pretty (bool) –

Return type:

None

cwl_utils.graph_split.rewrite(document, doc_id)

Rewrite the given element from the CWL $graph.

Parameters:
  • document (Any) –

  • doc_id (str) –

Return type:

Set[str]

cwl_utils.graph_split.rewrite_import(document)

Adjust the $import directive.

Parameters:

document (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)

Dump the schemadefs to their own file.

Parameters:

document (MutableMapping[str, Any]) –

Return type:

Set[str]

cwl_utils.graph_split.json_dump(entry, output_file)

Output object as JSON.

Parameters:
  • entry (Any) –

  • output_file (str) –

Return type:

None

cwl_utils.graph_split.yaml_dump(entry, output_file, pretty)

Output object as YAML.

Parameters:
  • entry (Any) –

  • output_file (str) –

  • pretty (bool) –

Return type:

None