fix(basketball): fetch the WNBA postseason - #325
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Continuing the season-readiness sweep from #324 across the other sports plugins. The WNBA window was: # WNBA season typically runs from May to September datestring = f"{season_year}0501-{season_year}0930" The regular season does end in September. The playoffs and Finals do not -- 2024's Finals ended on 20 October, 2025's in mid-October. Both fetch calls pass this string as `dates=` and there is no date-less fallback, so no postseason game was ever fetched: the scoreboard went blank exactly when the games matter most. The window now closes on 1 November. Timing: the 2026 regular season ends in early September and the postseason runs from mid-September into October, so this would have started dropping games within weeks. The other three leagues in this plugin were checked and are correct, so they are covered by the test rather than changed: NBA 1 October start, flips on 1 October, reaches the June Finals NCAA M/W no date window at all -- ESPN's `season` parameter, keyed to the year the season ENDS, flipping on 1 November ahead of the early-November openers Swept every other sports plugin for the same shape. Only hockey-scoreboard's data_fetcher.py had pinned dates, fixed separately in #324; MLB, MiLB, NFL, NCAA FB and NCAA hockey all derive their windows correctly and cover their postseasons. Tests: 6 of the new checks fail against the previous window. Suite 12 passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
1f9a70e to
92432a7
Compare
|
Force-pushed to correct the branch scope — worth flagging since the history changed. This branch had picked up four commits that don't belong to it (#322's soccer registry fix and #323's youtube-stats fix). My mistake: an earlier merge-order test ran Nothing was wrong with the code — all four PRs were green — but merging this one would have silently merged #322 and #323 with it. The branch is now a single commit on top of |
Continuing the season-readiness sweep from #324 across the remaining sports plugins. One real bug, and it's on a clock.
WNBA never fetched its own postseason
The regular season does end in September. The playoffs and Finals don't — 2024's Finals ended 20 October, 2025's in mid-October. Both fetch calls pass this string as
dates=, and there's no date-less fallback, so no postseason game was ever retrieved. The scoreboard went blank exactly when the games matter most.Window now closes 1 November.
Timing: the 2026 regular season ends in early September and the postseason runs mid-September into October — this would have started dropping games within weeks.
The other leagues are fine
Checked rather than assumed, and covered by the test rather than changed:
{y}1001-{y+1}0630, flips 1 Octseasonparam, flips 1 NovThe NCAA ones caught me out briefly: they use no date window at all, so the truncation risk doesn't apply, but the season number has to be right.
now.month >= 11 → year + 1matches ESPN's convention of labelling 2026-27 as season 2027.Repo-wide sweep
Swept every sports plugin for both failure shapes — pinned literal dates, and windows that stop before the postseason:
hockey-scoreboard/data_fetcher.py, fixed separately in fix(hockey): derive the ESPN season window instead of pinning it to 2025-26 #324.0301-1101) covers a November World Series; NFL (0801-{y+1}0301) covers a February Super Bowl; NCAA FB (0801-{y+1}0201) covers the January CFP final; NCAA hockey (0901-{y+1}0501) covers the April Frozen Four; UFC uses the full calendar year.Verification
6 of the new checks fail against the previous window. Suite 12 passed (up from 11).
Not verified on hardware — both rigs have been unreachable all day.
🤖 Generated with Claude Code
https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW