| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- 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<Self>;
- }
- pub trait InitializeSolo: Sized {
- fn initialize(id: &str, time: &str, config: &Config) -> anyhow::Result<Self>;
- }
- pub trait ShouldRun {
- fn should_run(&self) -> bool;
- }
- pub trait Version {
- fn version(config: &Config) -> anyhow::Result<String>;
- fn version_slurm(_config: &Config) -> anyhow::Result<String> {
- anyhow::bail!("No configured")
- }
- }
- // pub trait LoadVariants {
- // fn load_variants(&self) -> anyhow::Result<Variants>;
- // }
- 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(())
- }
|