cwl_utils.expression
CWL Expression parsing.
Attributes
Classes
Tokens. |
Functions
|
Find JS relevant punctuation in a string. |
|
|
|
Interpolate and evaluate. |
|
Make sure all the byte strings are converted to str in rootvars dict. |
|
|
|
Evaluate the given CWL expression, in context. |
Module Contents
- cwl_utils.expression.OLD_ESCAPE_CWL_VERSIONS: Final[collections.abc.Container[str]] = ('v1.0', 'v1.1.0-dev1', 'v1.1', 'v1.2.0-dev1', 'v1.2.0-dev2', 'v1.2.0-dev3')
- class cwl_utils.expression.t(*args, **kwds)
Bases:
enum.Enum
Tokens.
- DEFAULT = 0
- DOLLAR = 1
- PAREN = 2
- BRACE = 3
- SINGLE_QUOTE = 4
- DOUBLE_QUOTE = 5
- BACKSLASH = 6
- cwl_utils.expression.scanner(scan)
Find JS relevant punctuation in a string.
- cwl_utils.expression.evaluator(js_engine, ex, obj, jslib, fullJS, **kwargs)
- Parameters:
js_engine (cwl_utils.sandboxjs.JSEngine)
ex (str)
jslib (str)
fullJS (bool)
kwargs (Any)
- Return type:
- 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:
scan (str)
rootvars (cwl_utils.types.CWLParameterContext)
jslib (str)
fullJS (bool)
strip_whitespace (bool)
escaping_behavior (int)
convert_to_expression (bool)
js_engine (cwl_utils.sandboxjs.JSEngine | None)
kwargs (Any)
- Return type:
- cwl_utils.expression.jshead(engine_config, rootvars)
Make sure all the byte strings are converted to str in rootvars dict.
- Parameters:
rootvars (cwl_utils.types.CWLParameterContext)
- Return type:
- 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 (cwl_utils.types.CWLOutputType | None)
jobinput (cwl_utils.types.CWLObjectType)
requirements (list[cwl_utils.types.CWLObjectType])
outdir (str | None)
tmpdir (str | None)
context (cwl_utils.types.CWLOutputType | None)
strip_whitespace (bool)
cwlVersion (str)
kwargs (Any)
- Return type: