T-186: M2.3n — tools/curate-etl: curate-bars-1m CLI command (file mode) wiring run_curate_bars_1m into cli.rs + main.rs with parser tests (no new crates, no bench changes, no --from-mongo, no live Mongo/QuestDB)
This commit is contained in:
parent
eebbdd511c
commit
ff7db8abda
2 changed files with 17 additions and 8 deletions
|
|
@ -1686,8 +1686,7 @@ curate-etl curate-bars-1m \
|
||||||
--provider-mapping provider_mapping.tsv \
|
--provider-mapping provider_mapping.tsv \
|
||||||
--out ./out \
|
--out ./out \
|
||||||
--shards 4 \
|
--shards 4 \
|
||||||
--known-at-micros 1750000000000000 \
|
--known-at-micros 1750000000000000
|
||||||
[--mapping-source eod]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Required flags:** `--eod-intraday <path>`, `--qm-splits <path>`, `--provider-mapping <path>`, `--out <dir>`, `--shards <N>` (positive base-10 integer, no default), and `--known-at-micros <i64>` (positive base-10 UTC microsecond timestamp, no default).
|
- **Required flags:** `--eod-intraday <path>`, `--qm-splits <path>`, `--provider-mapping <path>`, `--out <dir>`, `--shards <N>` (positive base-10 integer, no default), and `--known-at-micros <i64>` (positive base-10 UTC microsecond timestamp, no default).
|
||||||
|
|
|
||||||
|
|
@ -3687,8 +3687,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn curate_bars_1m_usage_mentions_command_and_all_flags() {
|
fn curate_bars_1m_usage_mentions_command_and_all_flags() {
|
||||||
let expected_tokens = [
|
let expected_flags = [
|
||||||
"curate-bars-1m",
|
|
||||||
"--eod-intraday",
|
"--eod-intraday",
|
||||||
"--qm-splits",
|
"--qm-splits",
|
||||||
"--provider-mapping",
|
"--provider-mapping",
|
||||||
|
|
@ -3699,11 +3698,22 @@ mod tests {
|
||||||
];
|
];
|
||||||
let usage = format_usage("curate-etl", "0.1.0");
|
let usage = format_usage("curate-etl", "0.1.0");
|
||||||
let usage_stderr = format_usage_stderr("curate-etl");
|
let usage_stderr = format_usage_stderr("curate-etl");
|
||||||
for token in expected_tokens {
|
let usage_line = usage
|
||||||
assert!(usage.contains(token), "format_usage missing {token}");
|
.lines()
|
||||||
|
.find(|line| line.trim_start().starts_with("curate-etl curate-bars-1m "))
|
||||||
|
.expect("format_usage missing curate-bars-1m command line");
|
||||||
|
let stderr_line = usage_stderr
|
||||||
|
.lines()
|
||||||
|
.find(|line| line.trim_start().starts_with("curate-etl curate-bars-1m "))
|
||||||
|
.expect("format_usage_stderr missing curate-bars-1m command line");
|
||||||
|
for flag in expected_flags {
|
||||||
assert!(
|
assert!(
|
||||||
usage_stderr.contains(token),
|
usage_line.contains(flag),
|
||||||
"format_usage_stderr missing {token}"
|
"format_usage curate-bars-1m line missing {flag}: {usage_line}"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
stderr_line.contains(flag),
|
||||||
|
"format_usage_stderr curate-bars-1m line missing {flag}: {stderr_line}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue