MCPcopy Create free account
hub / github.com/Open-Quant/openquant / events_to_map

Function events_to_map

crates/openquant/tests/labeling.rs:38–42  ·  view source on GitHub ↗
(
    events: Vec<(NaiveDateTime, Event)>,
)

Source from the content-addressed store, hash-verified

36}
37
38fn load_reference() -> serde_json::Value {
39 let path =
40 Path::new(env!("CARGO_MANIFEST_DIR")).join("../../tests/fixtures/labeling/reference.json");
41 serde_json::from_str(&std::fs::read_to_string(path).unwrap()).unwrap()
42}
43
44fn parse_reference_ts(value: &serde_json::Value) -> Option<NaiveDateTime> {
45 value.as_str().map(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S%.f").unwrap())

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected