Address fourth review round: observability, docs accuracy, dep hygiene, tests
- Warn when no timing data was found at all (empty --times-dir previously produced empty CSVs without any hint) — best_cars empty + non-empty car list now logs a warning in parse_all_times - Remove the inaccurate "known gap" doc from write_trash_csv: category 1 (not best on any track) already covers non-final cars, so the documented gap never existed - Gate env_logger behind the bin-logging feature (default-on) and mark the records binary as requiring it, so downstream lib consumers do not pull env_logger transitively; lib builds clean with --no-default-features - Switch fetch_car progress output from println! to log::info! so RUST_LOG controls it - atomic_write takes &Path instead of &PathBuf - Add direct unit tests for is_final_build (sum-8 finals, maxed builds, sub-8 non-finals, malformed inputs) and a parsing test covering missing/null/non-numeric "t" fields (warn + skip, valid entries still parsed)
This commit is contained in:
parent
58b8d23e68
commit
1a844e7aa8
4 changed files with 107 additions and 10 deletions
|
|
@ -7,9 +7,12 @@ edition = "2021"
|
|||
name = "top_drives"
|
||||
path = "src/lib.rs"
|
||||
|
||||
# Bin-only (logger init in records.rs); required-features keeps the lib crate's
|
||||
# downstream consumers free of env_logger unless they opt in.
|
||||
[[bin]]
|
||||
name = "records"
|
||||
path = "src/records.rs"
|
||||
required-features = ["bin-logging"]
|
||||
|
||||
[dependencies]
|
||||
reqwest = "0.12.15"
|
||||
|
|
@ -21,10 +24,11 @@ clap = { version = "4", features = ["derive"] }
|
|||
thiserror = "2"
|
||||
dashmap = "6"
|
||||
log = "0.4"
|
||||
env_logger = "0.11"
|
||||
env_logger = { version = "0.11", optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["bin-logging", "test-utils"]
|
||||
bin-logging = ["dep:env_logger"]
|
||||
test-utils = []
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue