galaxy.tools.expressions package
- galaxy.tools.expressions.do_eval(expression: str, jobinput: MutableMapping[str, bool | str | int | float | CWLFileType | CWLDirectoryType | MutableSequence[CWLOutputType | None] | MutableMapping[str, CWLOutputType | None] | None], javascript_requirements: list[JavascriptRequirement] | None = None, outdir: str | None = None, tmpdir: str | None = None, context: bool | str | int | float | CWLFileType | CWLDirectoryType | MutableSequence[CWLOutputType | None] | MutableMapping[str, CWLOutputType | None] | None = None, sandbox_command: Sequence[str] | None = None)[source]
- exception galaxy.tools.expressions.ExpressionTemplateError(err_msg: str | None = None, type='info', **extra_error_info)[source]
Bases:
MessageExceptionA
$(...)/${...}block in a tool template does not parse.
- galaxy.tools.expressions.register() None[source]
Install the sandboxed engine as the process-wide
cwl_utilsJS engine.Idempotent and thread-safe. Call before any expression is evaluated so no code path falls back to the unsafe Node
vmengine.
- galaxy.tools.expressions.resolve_isolation_command(setting: str) tuple[str, ...] | None[source]
Resolve the
expression_evaluation_isolation_commandsetting to a wrapper.empty ->
None(ordinary worker subprocess)"bubblewrap"/"bwrap"-> the built-in bubblewrap command, but only on Linux withbwrapon PATH; otherwiseNone(ordinary worker subprocess) with a one-time warning, so a macOS dev box or a host without bubblewrap degrades cleanlyanything else -> the value parsed as a literal command prefix, used as-is
Cached so the PATH lookup and any warning happen once per distinct setting.
- galaxy.tools.expressions.validate_expression_template(expression: str, description: str = 'command template') None[source]
Reject a template the expression scanner cannot read before evaluating it.
- galaxy.tools.expressions.write_evalute_script(in_directory)[source]
Responsible for writing the script that evaluates expressions in Galaxy jobs.
Submodules
galaxy.tools.expressions.evaluation module
- exception galaxy.tools.expressions.evaluation.ExpressionTemplateError(err_msg: str | None = None, type='info', **extra_error_info)[source]
Bases:
MessageExceptionA
$(...)/${...}block in a tool template does not parse.
- galaxy.tools.expressions.evaluation.validate_expression_template(expression: str, description: str = 'command template') None[source]
Reject a template the expression scanner cannot read before evaluating it.
- galaxy.tools.expressions.evaluation.do_eval(expression: str, jobinput: MutableMapping[str, bool | str | int | float | CWLFileType | CWLDirectoryType | MutableSequence[CWLOutputType | None] | MutableMapping[str, CWLOutputType | None] | None], javascript_requirements: list[JavascriptRequirement] | None = None, outdir: str | None = None, tmpdir: str | None = None, context: bool | str | int | float | CWLFileType | CWLDirectoryType | MutableSequence[CWLOutputType | None] | MutableMapping[str, CWLOutputType | None] | None = None, sandbox_command: Sequence[str] | None = None)[source]