orchestral-cli 0.2.0

Command line interface for running Orchestral workflows
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Clone, Debug)]
pub struct ProgressState {
    pub step: usize,
    pub total: usize,
}

impl ProgressState {
    pub fn ratio(&self) -> f64 {
        if self.total == 0 {
            return 0.0;
        }
        (self.step as f64 / self.total as f64).clamp(0.0, 1.0)
    }
}