Scripts.WorkflowScripts.Workflow_utils module
Contains methods used for python scripts related to workflows.
Note
This module is only used by automated workflows. Users of the Databank repository can safely ignore it.
- Scripts.WorkflowScripts.Workflow_utils.run_python_script(script_path: str, args: list | None = None, error_message: str = 'Python script failed', working_dir: str | None = None) None [source]
Execute a Python script with the current interpreter and optional arguments.
- Parameters:
script_path – Absolute 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.
- Scripts.WorkflowScripts.Workflow_utils.get_databank_paths(nmlb_root_path: str) dict [source]
Retrieve relevant paths from databank.
- Parameters:
nmlb_root_path – Root path of the database repository.
- Returns:
Dictionary mapping descriptive keys to full paths of databank components.
- Return type:
dict