cwl_utils.expression

CWL Expression parsing.

Functions

scanner(scan)

evaluator(js_engine, ex, obj, jslib, fullJS, **kwargs)

interpolate(scan, rootvars[, jslib, fullJS, ...])

Interpolate and evaluate.

jshead(engine_config, rootvars)

needs_parsing(snippet)

do_eval(ex, jobinput, requirements, outdir, tmpdir, ...)

Evaluate the given CWL expression, in context.

Module Contents

cwl_utils.expression.scanner(scan)
Parameters:

scan (str)

Return type:

Optional[Tuple[int, int]]

cwl_utils.expression.evaluator(js_engine, ex, obj, jslib, fullJS, **kwargs)
Parameters:
Return type:

Optional[cwl_utils.types.CWLOutputType]

cwl_utils.expression.interpolate(scan, rootvars, jslib='', fullJS=False, strip_whitespace=True, escaping_behavior=2, convert_to_expression=False, js_engine=None, **kwargs)

Interpolate and evaluate.

Note: only call with convert_to_expression=True on CWL Expressions in $() form that need interpolation.

Parameters:
Return type:

Optional[cwl_utils.types.CWLOutputType]

cwl_utils.expression.jshead(engine_config, rootvars)
Parameters:
  • engine_config (List[str])

  • rootvars (cwl_utils.types.CWLObjectType)

Return type:

str

cwl_utils.expression.needs_parsing(snippet)
Parameters:

snippet (Any)

Return type:

bool

cwl_utils.expression.do_eval(ex, jobinput, requirements, outdir, tmpdir, resources, context=None, timeout=default_timeout, strip_whitespace=True, cwlVersion='', **kwargs)

Evaluate the given CWL expression, in context.

Parameters:
  • timeout (float) – The maximum number of seconds to wait while executing.

  • ex (Optional[cwl_utils.types.CWLOutputType])

  • jobinput (cwl_utils.types.CWLObjectType)

  • requirements (List[cwl_utils.types.CWLObjectType])

  • outdir (Optional[str])

  • tmpdir (Optional[str])

  • resources (Dict[str, Union[float, int]])

  • context (Optional[cwl_utils.types.CWLOutputType])

  • strip_whitespace (bool)

  • cwlVersion (str)

  • kwargs (Any)

Return type:

Optional[cwl_utils.types.CWLOutputType]