valska_hera_beam.external_tools.bayeseor.runner

Runner abstractions for executing BayesEoR via conda or containers.

Classes

BayesEoRInstall(repo_path[, run_script])

Where BayesEoR lives and which script to invoke.

CondaRunner(conda_activate, env_name)

Run BayesEoR via a named conda environment.

ContainerRunner(apptainer_exe, image_path[, ...])

Future: Run BayesEoR inside a container (Apptainer/Singularity).

class valska_hera_beam.external_tools.bayeseor.runner.BayesEoRInstall(repo_path: Path, run_script: Path = PosixPath('scripts/run-analysis.py'))

Where BayesEoR lives and which script to invoke.

Notes: - For now we assume a BayesEoR clone exists (HPC-friendly). - Later, if BayesEoR provides a stable module/entrypoint, we can support that too.

repo_path: Path
run_script: Path = PosixPath('scripts/run-analysis.py')
class valska_hera_beam.external_tools.bayeseor.runner.CondaRunner(conda_activate: str, env_name: str)

Run BayesEoR via a named conda environment.

conda_activate should point to conda.sh (or equivalent) so that conda activate works inside non-interactive batch shells (SLURM).

bash_prefix() str

Return shell lines to activate the conda environment.

conda_activate: str
env_name: str
class valska_hera_beam.external_tools.bayeseor.runner.ContainerRunner(apptainer_exe: str, image_path: Path, bind_paths: tuple[Path, ...] = ())

Future: Run BayesEoR inside a container (Apptainer/Singularity).

This is included now so we don’t need to redesign the API later. The only thing that should change is how we construct the command line; config rendering and output directory conventions stay identical.

Example future command:

apptainer exec –bind <binds> <image.sif> python <run-analysis.py> <config.yaml>

apptainer_exe: str
bind_paths: tuple[Path, ...] = ()
image_path: Path