blue_cwl.core.command

Local/Remote command building and execution.

Functions

build_salloc_command(slurm_config, cmd)

Build salloc command.

run_command(str_command, *[, ...])

Execute a command using the process constructed from the process_constructor.

blue_cwl.core.command.build_salloc_command(slurm_config: SlurmConfig, cmd: str)

Build salloc command.

blue_cwl.core.command.run_command(str_command: str, *, process_constructor=<class 'subprocess.Popen'>, masked_vars: list[str] | None = None, redirect_to: str | ~os.PathLike[str] | None = None) None

Execute a command using the process constructed from the process_constructor.

Parameters:
  • str_command – command string to execute.

  • process_constructor – The process constructor to use. Default is the subprocess.Popen.

  • masked_vars – Optional var names to mask when the command is printed.

  • redirect_to – Optional file to redirect the process output.