Tank01 provider DTO and week-pinned client #431
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!431
Loading…
Reference in a new issue
No description provided.
Delete branch "create-the-pydantic-models-in-the-shape-of-the-tank-game-428"
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?
First slice of the provider-boundary rewrite (#427). Draft on purpose --
further slices land on this branch as they are done.
What is here
app/tank01_api/schemas.py-- Pydantic mirror of/getNFLGamesForWeek.Tank01's field names verbatim, every field a
str. Seven of the seventeenfields on the wire: the ones we actually consume.
app/tank01_api/client.py--Tank01Client, pinned to one week, fetchesand memoizes, returns DTOs and nothing pool-shaped.
tests/test_tank01_client.py-- 13 tests.Nothing is wired into the running app.
tank01_api.pyis untouched, so thischanges no behavior.
Two decisions worth reviewing
gameStatusCodeis deliberately not modelled. This endpoint reports itstale -- the schedule says
"0"for games/getNFLScoresOnlyknows are liveor final. Leaving it off the DTO makes "status comes from the scores payload"
structural rather than a comment someone can miss.
gameDateis carried verbatim and must never be derived. It is theprovider's join key to
/getNFLBettingOdds?gameDate=, in US Eastern.Deriving it from
gameTime_epochlooks safe and is wrong for every gamekicking off after 8pm ET -- the UTC date has already rolled over, so it would
silently request odds for the wrong day on every Thu/Sun/Mon night game. See
#430.
Verification
162 passed, pylint 10.00/10, flake8 clean.
Version bump held until this leaves draft.
🤖 Generated with Claude Code
WIP: Tank01 provider DTO and week-pinned clientto Tank01 provider DTO and week-pinned client