cwltool.context

Shared context objects that replace use of kwargs.

Module Contents

Classes

ContextBase

Shared kwargs based initilizer for {Runtime,Loading}Context.

LoadingContext

Shared kwargs based initilizer for {Runtime,Loading}Context.

RuntimeContext

Shared kwargs based initilizer for {Runtime,Loading}Context.

Functions

make_tool_notimpl(toolpath_object, loadingContext)

log_handler(outdir, base_path_logs, stdout_path, stderr_path)

Move logs from log location to final output.

set_log_dir(outdir, log_dir, subdir_name)

Default handler for setting the log directory.

getdefault(val, default)

Attributes

default_make_tool

class cwltool.context.ContextBase(kwargs=None)

Shared kwargs based initilizer for {Runtime,Loading}Context.

Parameters

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

cwltool.context.make_tool_notimpl(toolpath_object, loadingContext)
Parameters
  • toolpath_object (ruamel.yaml.comments.CommentedMap) –

  • loadingContext (LoadingContext) –

Return type

cwltool.process.Process

cwltool.context.default_make_tool
cwltool.context.log_handler(outdir, base_path_logs, stdout_path, stderr_path)

Move logs from log location to final output.

Parameters
  • outdir (str) –

  • base_path_logs (str) –

  • stdout_path (Optional[str]) –

  • stderr_path (Optional[str]) –

Return type

None

cwltool.context.set_log_dir(outdir, log_dir, subdir_name)

Default handler for setting the log directory.

Parameters
  • outdir (str) –

  • log_dir (str) –

  • subdir_name (str) –

Return type

str

class cwltool.context.LoadingContext(kwargs=None)

Bases: ContextBase

Inheritance diagram of cwltool.context.LoadingContext

Shared kwargs based initilizer for {Runtime,Loading}Context.

Parameters

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

copy(self)
Return type

LoadingContext

class cwltool.context.RuntimeContext(kwargs=None)

Bases: ContextBase

Inheritance diagram of cwltool.context.RuntimeContext

Shared kwargs based initilizer for {Runtime,Loading}Context.

Parameters

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

get_outdir(self)

Return self.outdir or create one with self.tmp_outdir_prefix.

Return type

str

get_tmpdir(self)

Return self.tmpdir or create one with self.tmpdir_prefix.

Return type

str

get_stagedir(self)

Return self.stagedir or create one with self.tmpdir_prefix.

Return type

str

create_tmpdir(self)

Create a temporary directory that respects self.tmpdir_prefix.

Return type

str

create_outdir(self)

Create a temporary directory that respects self.tmp_outdir_prefix.

Return type

str

copy(self)
Return type

RuntimeContext

cwltool.context.getdefault(val, default)
Parameters
  • val (Any) –

  • default (Any) –

Return type

Any