Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.sites.task_chain.run_task_chain_bash_file

Python interpreter for the main bash file running a task chain.

Useful when running multiple task chains in sequence as the import costs largely only has to be paid once.

Functions

run_task_chain_bash_file()

def run_task_chain_bash_file(
    filename: Union[str, pathlib.Path],
    stdout: Union[str, pathlib.Path],
    stderr: Union[str, pathlib.Path],
    cwd: Union[str, pathlib.Path],
) -> salvus.flow.sites.types.JobStatus:
    ...

Run the bash file for a single task chain fully within Python. The main advantage is that import costs in the Python part only have to paid once.

Parameters
  • filename Union[str, pathlib.Path] — Path to the bash file.
  • stdout Union[str, pathlib.Path] — Stdout for all tasks.
  • stderr Union[str, pathlib.Path] — Stderr for all tasks.
  • cwd Union[str, pathlib.Path] — Working directory for running the tasks.
Returns salvus.flow.sites.types.JobStatus

set_cwd()

def set_cwd(path: pathlib.Path) -> Generator[NoneType, NoneType, NoneType]:
    ...

Contextmanager changing the current working directory. Will restore the working directory upon exiting.

Parameters
  • path pathlib.Path — The path to change the current working directory to.
Returns Generator[NoneType, NoneType, NoneType]