From bafb720731615649b87ba736278b1a4820caa423 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Sat, 28 Feb 2026 12:09:42 -0600 Subject: [PATCH] =?UTF-8?q?store:=20Rust=20CSV=20importer=20integration=20?= =?UTF-8?q?tested=20=E2=80=94=20matches=20Python=20DB=20exactly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n-tested-matches-python-db-exact-ad48fe.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 graph/solutions/rust-csv-importer-integration-tested-matches-python-db-exact-ad48fe.md diff --git a/graph/solutions/rust-csv-importer-integration-tested-matches-python-db-exact-ad48fe.md b/graph/solutions/rust-csv-importer-integration-tested-matches-python-db-exact-ad48fe.md new file mode 100644 index 00000000000..35fa806c0bc --- /dev/null +++ b/graph/solutions/rust-csv-importer-integration-tested-matches-python-db-exact-ad48fe.md @@ -0,0 +1,39 @@ +--- +id: ad48fe50-12a6-4c65-a49c-3a691d75e03f +type: solution +title: "Rust CSV importer integration tested — matches Python DB exactly" +tags: [sba-scout, rust, importer, csv, testing, integration-test] +importance: 0.7 +confidence: 0.8 +created: "2026-02-28T18:09:42.807948+00:00" +updated: "2026-02-28T18:09:42.807948+00:00" +--- + +# Rust CSV importer integration tested — matches Python DB exactly + +## Context + +The Rust CSV card importer (`api/importer.rs`) had unit tests for parse helpers but no integration test against real CSV data. The Rust DB previously had 0 cards because the importer had never been run against actual files. + +## Test Run + +1. Copied `BatterCalcs.csv` and `PitcherCalcs.csv` to `rust/docs/sheets_export/` +2. Ran `import_all_cards()` against the Rust DB (`rust/data/sba_scout.db`) + +## Results + +| Type | Cards Imported | Errors | +|---------|---------------|--------| +| Batter | 490 | 0 | +| Pitcher | 502 | 0 | + +Identical to Python DB row counts. Sample values verified (Rutschman batter card, Ben Brown pitcher card). + +## Committed + +CSVs committed to repo at `rust/docs/sheets_export/`. + +## Key Notes + +- Default CSV paths are relative to `rust/` cwd: `docs/sheets_export/BatterCalcs.csv` and `docs/sheets_export/PitcherCalcs.csv` +- The Rust app uses `rust/data/sba_scout.db` (separate from Python's `data/sba_scout.db`)