use std::path::Path; use crate::{config::Config}; // pub mod somatic; pub mod somatic_slurm; pub mod somatic; pub trait Initialize: Sized { fn initialize(id: &str, config: &Config) -> anyhow::Result; } pub trait InitializeSolo: Sized { fn initialize(id: &str, time: &str, config: &Config) -> anyhow::Result; } pub trait ShouldRun { fn should_run(&self) -> bool; } pub trait Version { fn version(config: &Config) -> anyhow::Result; fn version_slurm(_config: &Config) -> anyhow::Result { anyhow::bail!("No configured") } } // pub trait LoadVariants { // fn load_variants(&self) -> anyhow::Result; // } pub fn exists_all(paths: Vec<&str>) -> anyhow::Result<()> { for path in paths.iter() { if !Path::new(path).exists() { anyhow::bail!("{path} should exist") } } Ok(()) }