T-202: M2.2t (retry of T-201) — tools/curate-etl: curate-macro CLI command (file mode) wiring the existing run_curate_macro into cli.rs + main.rs with parser tests and a binary end-to-end test (no new crates, no bench changes, no live Mongo)
This commit is contained in:
parent
9279bb0f08
commit
8f3126cf30
2 changed files with 8 additions and 13 deletions
|
|
@ -5835,12 +5835,7 @@ mod tests {
|
|||
"--te-data",
|
||||
),
|
||||
(
|
||||
&[
|
||||
"curate-macro",
|
||||
"--series-map",
|
||||
"--te-data",
|
||||
"teData.bson",
|
||||
][..],
|
||||
&["curate-macro", "--series-map", "--te-data", "teData.bson"][..],
|
||||
"--series-map",
|
||||
),
|
||||
] {
|
||||
|
|
@ -5915,10 +5910,7 @@ mod tests {
|
|||
&["curate-macro", "--from-mongo", "--out", "o"][..],
|
||||
"--from-mongo",
|
||||
),
|
||||
(
|
||||
&["curate-macro", "--from-mongo=true"][..],
|
||||
"--from-mongo",
|
||||
),
|
||||
(&["curate-macro", "--from-mongo=true"][..], "--from-mongo"),
|
||||
(
|
||||
&["curate-macro", "--mongo-uri", "mongodb://host"][..],
|
||||
"--mongo-uri",
|
||||
|
|
@ -5937,7 +5929,10 @@ mod tests {
|
|||
|
||||
// Unexpected positional argument rejected
|
||||
let err = parse_args(&to_args(&["curate-macro", "extra"])).unwrap_err();
|
||||
assert_eq!(err, "unexpected positional argument 'extra' for curate-macro");
|
||||
assert_eq!(
|
||||
err,
|
||||
"unexpected positional argument 'extra' for curate-macro"
|
||||
);
|
||||
|
||||
// CR/LF in arguments are escaped to a single diagnostic line
|
||||
let err = parse_args(&to_args(&["curate-macro", "bad\nline\rarg"])).unwrap_err();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use std::sync::atomic::{AtomicU64, Ordering};
|
|||
|
||||
use bson::raw::{cstr, RawArrayBuf, RawDocumentBuf};
|
||||
use bson::DateTime;
|
||||
use curate_etl::macro_series::{MACRO_KNOWN_AT_SOURCE, POLICY_RATE_LAG_DAYS};
|
||||
use curate_etl::macro_series::POLICY_RATE_LAG_DAYS;
|
||||
use curate_etl::run_curate_macro::{
|
||||
format_curate_macro_report, run_curate_macro, CurateMacroArgs, MACRO_SERIES_MAP_HEADER,
|
||||
};
|
||||
|
|
@ -191,7 +191,7 @@ fn cli_publishes_runner_equivalent_macro_parquet_and_excludes_forecast_sentinel(
|
|||
);
|
||||
assert_eq!(
|
||||
col(row, "known_at_source"),
|
||||
&Field::Str(MACRO_KNOWN_AT_SOURCE.to_string())
|
||||
&Field::Str("publication_lag_estimate".to_string())
|
||||
);
|
||||
assert_eq!(col(row, "value"), &Field::Double(5.5));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue