artifactize-core 0.13.1

The library behind artifactize: Artifacts, evals, reviews, the monitor and review models, and the shared operations every interface calls.
Documentation
1
2
3
4
5
6
7
8
9
10
11
#[path = "../tests/support/declaration.rs"]
mod shared;
pub use shared::{read, to_toml, write};

/// Parse the real input shape without semantic validation, for strategy/schema tests.
pub fn eval(value: serde_json::Value) -> Result<crate::config::EvalDeclaration, String> {
    let source = to_toml(serde_json::json!({"name":"test","evals":[value]}))?;
    let mut declaration: crate::config::ArtifactDeclaration =
        toml::from_str(&source).map_err(|error| error.to_string())?;
    Ok(declaration.evals.remove(0))
}