cwltool.procgenerator

Attributes

CWLObjectType

Typical raw dictionary found in lightly parsed CWL.

JobsGeneratorType

OutputCallbackType

Exceptions

WorkflowException

Common base class for all non-exit exceptions.

Classes

LoadingContext

Shared kwargs based initializer for RuntimeContext and LoadingContext.

RuntimeContext

Shared kwargs based initializer for RuntimeContext and LoadingContext.

Process

Abstract CWL Process.

ProcessGeneratorJob

Result of ProcessGenerator.job().

ProcessGenerator

Abstract CWL Process.

Functions

load_tool(argsworkflow[, loadingContext])

shortname(inputid)

Module Contents

class cwltool.procgenerator.LoadingContext(kwargs=None)

Bases: ContextBase

Inheritance diagram of cwltool.procgenerator.LoadingContext

Shared kwargs based initializer for RuntimeContext and LoadingContext.

Parameters:

kwargs (Optional[Dict[str, Any]])

copy()

Return a copy of this LoadingContext.

Return type:

LoadingContext

class cwltool.procgenerator.RuntimeContext(kwargs=None)

Bases: ContextBase

Inheritance diagram of cwltool.procgenerator.RuntimeContext

Shared kwargs based initializer for RuntimeContext and LoadingContext.

Parameters:

kwargs (Optional[Dict[str, Any]])

outdir: str | None = None
tmpdir: str = ''
tmpdir_prefix: str
tmp_outdir_prefix: str = ''
stagedir: str = ''
get_outdir()

Return outdir or create one with tmp_outdir_prefix.

Return type:

str

get_tmpdir()

Return tmpdir or create one with tmpdir_prefix.

Return type:

str

get_stagedir()

Return stagedir or create one with tmpdir_prefix.

Return type:

str

create_tmpdir()

Create a temporary directory that respects tmpdir_prefix.

Return type:

str

create_outdir()

Create a temporary directory that respects tmp_outdir_prefix.

Return type:

str

copy()

Return a copy of this RuntimeContext.

Return type:

RuntimeContext

exception cwltool.procgenerator.WorkflowException

Bases: Exception

Inheritance diagram of cwltool.procgenerator.WorkflowException

Common base class for all non-exit exceptions.

cwltool.procgenerator.load_tool(argsworkflow, loadingContext=None)
Parameters:
Return type:

cwltool.process.Process

class cwltool.procgenerator.Process(toolpath_object, loadingContext)

Bases: cwltool.utils.HasReqsHints

Inheritance diagram of cwltool.procgenerator.Process

Abstract CWL Process.

Parameters:
evalResources(builder, runtimeContext)
Parameters:
Return type:

Dict[str, Union[int, float]]

checkRequirements(rec, supported_process_requirements)

Check the presence of unsupported requirements.

Parameters:
  • rec (Union[MutableSequence[cwltool.utils.CWLObjectType], cwltool.utils.CWLObjectType, cwltool.utils.CWLOutputType, None])

  • supported_process_requirements (Iterable[str])

Return type:

None

validate_hints(avsc_names, hints, strict)

Process the hints field.

Parameters:
Return type:

None

visit(op)
Parameters:

op (Callable[[ruamel.yaml.comments.CommentedMap], None])

Return type:

None

abstract job(job_order, output_callbacks, runtimeContext)
Parameters:
  • job_order (cwltool.utils.CWLObjectType)

  • output_callbacks (Optional[cwltool.utils.OutputCallbackType])

  • runtimeContext (cwltool.context.RuntimeContext)

Return type:

cwltool.utils.JobsGeneratorType

__str__()

Return the id of this CWL process.

Return type:

str

cwltool.procgenerator.shortname(inputid)
Parameters:

inputid (str)

Return type:

str

cwltool.procgenerator.CWLObjectType

Typical raw dictionary found in lightly parsed CWL.

cwltool.procgenerator.JobsGeneratorType
cwltool.procgenerator.OutputCallbackType
class cwltool.procgenerator.ProcessGeneratorJob(procgenerator)

Result of ProcessGenerator.job().

Parameters:

procgenerator (ProcessGenerator)

receive_output(jobout, processStatus)

Process the results.

Parameters:
  • jobout (Optional[cwltool.utils.CWLObjectType])

  • processStatus (str)

Return type:

None

job(job_order, output_callbacks, runtimeContext)
Parameters:
  • job_order (cwltool.utils.CWLObjectType)

  • output_callbacks (Optional[cwltool.utils.OutputCallbackType])

  • runtimeContext (cwltool.context.RuntimeContext)

Return type:

cwltool.utils.JobsGeneratorType

class cwltool.procgenerator.ProcessGenerator(toolpath_object, loadingContext)

Bases: cwltool.process.Process

Inheritance diagram of cwltool.procgenerator.ProcessGenerator

Abstract CWL Process.

Parameters:
job(job_order, output_callbacks, runtimeContext)
Parameters:
  • job_order (cwltool.utils.CWLObjectType)

  • output_callbacks (Optional[cwltool.utils.OutputCallbackType])

  • runtimeContext (cwltool.context.RuntimeContext)

Return type:

cwltool.utils.JobsGeneratorType

result(job_order, jobout, runtimeContext)
Parameters:
Return type:

Tuple[cwltool.process.Process, cwltool.utils.CWLObjectType]