Add Tank01 provider and test harness ahead of the ESPN swap (#363) #390
No reviewers
Labels
No labels
Kestra
bug
enhancement
someday
subtask
☁️ api
🎛️ infrastructure
🐞 sentry
📆 2025 Season
📝 pages
allpicks
📝 pages
picks
📝 pages
standings
🚀 performance
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
johnsturgeon/tgfp-web!390
Loading…
Reference in a new issue
No description provided.
Delete branch "migrate-from-espn-api-to-thesportsdb-363"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduces app/football_api, a Tank01-via-RapidAPI wrapper presenting the
same public surface as app/espn_nfl, plus the test infrastructure the
migration needs. Nothing is switched over yet -- create_picks,
update_game, sync_team_records, and model_helpers all still construct
ESPNNfl. That swap is the next commit.
Test suite and fixtures were written by Claude (Fable & Opus 5) as a
TDD contract BEFORE the provider existed; the app/football_api
implementation is hand-written, with Claude reviewing on request.
Added:
strings normalized to the ints and STATUS_* values the models already
expect. Home spread is the median across sportsbooks, so a single
outlier book can't skew the pick.
the suite is deterministic and offline. tests/test_espn_nfl.py
characterizes the current ESPN behavior and is the contract
tests/test_football_api.py holds the replacement to.
api-drift workflow, so a provider changing shape surfaces on Tuesday
morning rather than during Wednesday's create-picks run.
Fixed on the ESPN side, surfaced by the characterization tests:
package imported, raising AttributeError the first time a retry fired.
a property; made them properties and updated the call sites, which is
also what lets both providers share one surface.
Refs #363. Draft until the interface swap lands.
Tests ONLY Co-Authored by: Claude Opus 5 noreply@anthropic.com
WIP: Add Tank01 provider and test harness ahead of the ESPN swap (#363)to Add Tank01 provider and test harness ahead of the ESPN swap (#363)