05/23 Phase 20

This commit is contained in:
2026-05-23 16:38:20 -04:00
parent 2553406254
commit ea30c7d838
6 changed files with 423 additions and 5 deletions
+16
View File
@@ -341,6 +341,22 @@ All actions are logged to console and optionally to a log file:
---
### ✅ Phase 20 — Number Wheeling System
- [x] Write `core/wheeling.py`
- [x] `wheel_count(numbers, k) -> int` — C(n, k) preview, deduplicates input
- [x] `wheel_full(numbers, k) -> list[list[int]]` — all combinations, each sorted ascending
- [x] Raises `ValueError` for invalid k, k > pool size, or count > `MAX_TICKETS` (200)
- [x] Update `ui/predictor_ui.py`
- [x] Add "Wheel" as 4th tab in ttk.Notebook
- [x] Game dropdown (synced on refresh), Numbers entry, Pick spinbox (defaults to game's main_count)
- [x] Live preview label: "Will generate X tickets (C(n,k))" updates as user types
- [x] Range validation against game's main_max before generating
- [x] Results treeview (#, Numbers) + BallsBar detail strip on row select
- [x] Save to DB (strategy="Wheel") + Copy + Clear buttons
- [x] Write `tests/test_wheeling.py` — 18 tests (379/379 total passing)
---
### ✅ Phase 19 — Dashboard Overdue Alert + DB Backup
- [x] Add `backup_db(dest_dir=None) -> str` to `db/database.py` — copies live DB to timestamped file, creates dest dir if needed
- [x] Add `restore_db(source_path: str) -> None` to `db/database.py` — overwrites live DB with backup file, raises FileNotFoundError if missing