nornir 0.1.0

Companion to cargo: dependency tracking, release gating, deploy, benchmarks, and documentation assembly. Project-agnostic.
Documentation
//! Arrow schemas for the warehouse tables.
//!
//! These mirror the column layouts a future Iceberg migration will
//! emit. Keep them stable; additions go on the end, types do not
//! change in place.

use std::sync::Arc;

use arrow::datatypes::{DataType, Field, Schema, TimeUnit};

pub fn bench_runs() -> Arc<Schema> {
    Arc::new(Schema::new(vec![
        Field::new("run_id", DataType::Utf8, false),
        Field::new("repo", DataType::Utf8, false),
        Field::new(
            "ts_micros",
            DataType::Timestamp(TimeUnit::Microsecond, Some("UTC".into())),
            false,
        ),
        Field::new("date", DataType::Utf8, false),
        Field::new("version", DataType::Utf8, false),
        Field::new("machine", DataType::Utf8, false),
        Field::new("cores", DataType::UInt32, false),
    ]))
}

pub fn bench_results() -> Arc<Schema> {
    Arc::new(Schema::new(vec![
        Field::new("run_id", DataType::Utf8, false),
        Field::new("result_name", DataType::Utf8, false),
        Field::new("metric_name", DataType::Utf8, false),
        Field::new("metric_value", DataType::Float64, false),
    ]))
}

pub fn test_outcomes() -> Arc<Schema> {
    Arc::new(Schema::new(vec![
        Field::new("run_id", DataType::Utf8, false),
        Field::new("test_name", DataType::Utf8, false),
        Field::new("passed", DataType::Boolean, false),
        Field::new("duration_ms", DataType::Float64, true),
        Field::new("message", DataType::Utf8, true),
    ]))
}