Scripts.WorkflowScripts.Workflow_utils module
- Scripts.WorkflowScripts.Workflow_utils.run_command(command, error_message='Command failed', working_dir=None)[source]
Run a shell command and exit on failure.
- Parameters:
command – The shell command to execute (string).
error_message – Message to display if the command fails.
working_dir – Optional working directory in which to run the command.
- Raises:
SystemExit – Exits with code 1 if the command fails.
- Scripts.WorkflowScripts.Workflow_utils.run_python_script(script_path, args=None, error_message='Python script failed', working_dir=None)[source]
Execute a Python script with the current interpreter and optional arguments.
- Parameters:
script_path – Path to the Python script to run.
args – List of arguments to pass to the script (defaults to []).
error_message – Message to display if execution fails.
working_dir – Optional working directory in which to run the script.
- Raises:
SystemExit – Exits with code 1 if the script execution fails.