Commit Graph

26 Commits

Author SHA1 Message Date
cal
3612b0710b Merge branch 'main' into ai/paper-dynasty-card-creation#4 2026-03-23 13:24:43 +00:00
Cal Corum
bd1809261e fix: apply timeout parameter to all aiohttp sessions in db_calls.py (#4)
Closes #4

Every async DB function accepted a `timeout` parameter but never passed
it to aiohttp, causing scripts to hang indefinitely if the API became
unresponsive. Fixed by passing `aiohttp.ClientTimeout(total=timeout)` to
each `aiohttp.ClientSession()` constructor across all six functions:
db_get, url_get, db_patch, db_post, db_put, db_delete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:03:03 -05:00
Cal Corum
e3220bf337 Remove hardcoded secrets, load API token from environment
- Replace hardcoded PD API bearer token in db_calls.py with dotenv/env var
- Delete scripts/supabase_doodling.py (dead scratch file with hardcoded Supabase JWT)
- Add python-dotenv dependency and .env.example template
- Consolidate check_prod_missing_ratings.py to import AUTH_TOKEN from db_calls
- Hard fail if PD_API_TOKEN is missing to prevent silent auth failures

Fixes #2, Fixes #3

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 12:38:01 -05:00
Cal Corum
0a17745389 Run black and ruff across entire codebase
Standardize formatting with black and apply ruff auto-fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:24:33 -05:00
Cal Corum
fe91de905a Add card generation pipeline agents and refresh scouting data
- Add retrosheet-card-update agent (8-step pipeline with validation gates)
- Add live-series-card-update agent (7-step pipeline with PotM support)
- Both agents: dev/prod S3 guard, environment verification, groundball_b validation
- Restore db_calls.py to production (alt_database = None)
- Refresh scouting reports (6303 batters, 7164 pitchers)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:16:50 -06:00
Cal Corum
92256cb29c Update scouting data and card creation scripts
- Regenerate scouting CSVs with latest player ratings
- Update archetype calculator with BP-HR whole number rule
- Refresh retrosheet normalized data
- Minor script updates for Kalin Young card creation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:25:42 -06:00
Cal Corum
13037bebce intro run for 05 Live 2025-11-10 15:02:28 -06:00
Cal Corum
6de22f7f1f Code stabilization & retrosheet functionality 2025-11-08 16:57:35 -06:00
Cal Corum
c89e1eb507 Claude introduction & Live Series Update 2025-07-22 09:24:34 -05:00
Cal Corum
3969bf008f December 22 Update 2024-12-22 15:46:52 -06:00
Cal Corum
25d4d9a63c Migrate to rotating file logger 2024-11-10 14:42:12 -06:00
Cal Corum
d7922a138c Green to go for 98 Live Series 2024-11-02 22:51:24 -05:00
Cal Corum
639e032586 Moving older scripts into holding cell 2024-10-17 09:28:02 -05:00
Cal Corum
72968f5e5d Add MLB Player support 2024-05-26 10:53:15 -05:00
Cal Corum
c4d9e0524f May 05 Card Data 2024-05-12 13:45:15 -05:00
Cal Corum
63b5487c44 Adding support for custom card creation 2024-03-08 00:26:54 -06:00
Cal Corum
14bf66212e Add ignore_limits parameter 2023-11-29 10:34:10 -06:00
Cal Corum
6539cdc37d Clean up db calls, add_second_card script 2023-11-20 22:00:13 -06:00
Cal Corum
8feaf3f44d Update db_calls.py 2023-11-20 01:00:24 -06:00
Cal Corum
0955261e7b Migrate db calls to aiohttp 2023-11-19 12:27:40 -06:00
Cal Corum
92e5240e65 Refactor pit/bat/def to modules 2023-11-05 12:18:42 -06:00
Cal Corum
a07dc98373 Reference prod database 2023-10-24 09:49:03 -05:00
Cal Corum
cfdf0e985d Batting card generation active
Fully functional through to png files
2023-10-14 23:42:53 -05:00
Cal Corum
4bde7f60ea fielding and batting functional
Still need pitching and setting player positions
2023-09-24 18:58:44 -05:00
Cal Corum
443eaa3a41 Phase 1 of creation complete 2023-09-22 01:29:51 -05:00
Cal Corum
7b9fe9df8d Phase 1 of automated updates 2023-09-19 09:38:18 -05:00