Commit Graph

5 Commits

Author SHA1 Message Date
Cal Corum
ebe4196bfc Implement Phase 3: calc layer with matchup scoring, league stats, and score cache
Port the Python calc layer to Rust: league stat distributions (avg excludes zeros,
stdev N-1 includes zeros), weighted standardized matchup scoring with switch-hitter
resolution and pitcher inversion, and SHA-256-validated score cache with automatic
rebuild after card imports. 105 tests passing (76 unit + 5 integration + 24 DB).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 23:35:01 -06:00
Cal Corum
3c70ecc71a Implement Phase 2: API client, sync pipeline, and CSV card importers
Port the full data ingestion layer from Python to Rust:
- Typed API client with 10 endpoints, serde response types, and error handling
- Team/player/transaction sync with proper upsert semantics (preserves hand field)
- Batter and pitcher CSV importers with 40+ column mappings each
- Parse helpers for float/int/endurance with 21 unit tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 22:56:50 -06:00
Cal Corum
3c0c206aba Add test scaffold and mark Phase 1 tasks complete
Set up lib.rs for integration test access, add 50 tests covering
calc engine (weights, standardization), model helpers (Player positions,
Lineup JSON roundtrips), and full query layer (in-memory SQLite).
Update PHASE1_PROJECT_PLAN.json to reflect all 12 tasks completed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:02:01 -06:00
Cal Corum
2005307b7a Implement Phase 1 foundation: DB schema, queries, and config integration
Wire up the full data pipeline for the Rust TUI rewrite:
- SQL schema creation for all 9 tables with correct types, FKs, and constraints
- 20 async query functions (teams, players, cards, lineups, sync status, cache)
- Config loading via figment integrated into main.rs startup flow
- App struct now holds SqlitePool and Settings for screen access
- Roster aggregate query and Lineup JSON helper methods
- Added csv, sha2, regex crates for upcoming phases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:17:36 -06:00
Cal Corum
6ddbd82f7c Add Rust project scaffold for TUI rewrite
Initialize rust/ subdirectory with ratatui + tokio + sqlx stack,
mirroring the Python module structure. Includes all DB models,
config loader, matchup scoring logic, and screen stubs that
compile cleanly with cargo check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:40:42 -06:00