Add NRL scoreboard plugin#182
Conversation
Add a new NRL (National Rugby League) scoreboard plugin, forked from soccer-scoreboard and collapsed to a single league. Shows live, recent, and upcoming games from ESPN's public rugby-league API with switch/scroll display, live priority, goal/win celebrations, dynamic per-mode durations, and Vegas continuous-scroll support. Data source: site.api.espn.com/apis/site/v2/sports/rugby-league/3/scoreboard. The league slug is ESPN's internal numeric "3" (NOT "nrl"); every point of use is commented to prevent a future "fix" that would 404 the endpoint. NRL is scored as a single running integer per team over two 40-minute halves, so period text is 1H/2H/HALF/ET/Final (not quarters). - manager.py: single-league NrlScoreboardPlugin orchestrator - nrl_managers.py: ESPN fetch + NRL parsing, create_nrl_managers factory - sports.py/game_renderer.py/scroll_display.py/data_sources.py/ base_odds_manager.py/dynamic_team_resolver.py: shared sport-agnostic base copied from soccer, logo handling genericized off sport_key - config_schema.json: flattened single-league schema (draft-07) with full customization parity - manifest.json + plugins.json registry entry - test/harness.json (live/recent/upcoming mock) + self-contained smoke test Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 3 high |
| Security | 2 medium |
🟢 Metrics 1170 complexity
Metric Results Complexity 1170
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.
Summary
Adds a new NRL (National Rugby League) scoreboard plugin (
plugins/nrl-scoreboard), forked fromsoccer-scoreboardand collapsed to a single league. It shows live, recent, and upcoming NRL games with full feature parity to the other sports scoreboards.Behavior
nrl_live,nrl_recent,nrl_upcoming, each independently toggleable and renderable as switch (one game at a time) or scroll (high-FPS horizontal).mode_durations.get_vegas_content_type→'multi').Data source & the
3slug quirkGames come from:
sport = "rugby-league",league = "3".3is ESPN's internal numeric slug for the NRL — the human-facing web path is/nrl/, but the API path segment is the literal string3(confirmed viasite.web.api.espn.com/apis/v2/scoreboard/header?sport=rugby-league→id:8370, abbreviation:"NRL", slug:"3"). Changing it tonrl404s the endpoint, so every point of use carries a comment warning against that.NRL is scored as a single running integer per team over two 40-minute halves (not quarters); the running clock counts up in minutes like soccer. Period text is
1H/2H/HALF/ET(golden point) /Final/ start time.Parity with soccer-scoreboard
sports.py,game_renderer.py,scroll_display.py,data_sources.py,base_odds_manager.py,dynamic_team_resolver.py: shared sport-agnostic base copied from soccer; the soccer-hardcoded logo directory/download logic insports.pywas genericized to key offsport_key("nrl").nrl_managers.py: ESPN fetch + NRL period parsing; singlecreate_nrl_managers()factory (replaces soccer's 10 league factories + custom-league machinery).manager.py:NrlScoreboardPlugin, single-league orchestrator; the multi-league registry/custom-league code collapses to one manager set while keeping dynamic duration, scroll vs switch, live priority/celebration, and the Vegas hooks.config_schema.json: soccer's per-league knobs flattened to a single-league draft-07 schema (additionalProperties: false) with the fullcustomizationblock.plugins.jsonregistry entry added.Test plan
python3 -m py_compileall.pyinplugins/nrl-scoreboard/— passes.manifest.json,config_schema.json,test/harness.json,plugins.jsonall parse.rugby-league/3/scoreboardreturns HTTP 200; parser handles the real fields (scores, abbreviations,status.type.state/period/displayClock).test_nrl_plugin.py) passes (6/6): manifest/schema/harness invariants + the3-slug guard + period-mapping.manager.pycontrol flow exercised end-to-end with stubbed deps (init, update, live-priority, switch/scroll/cycle display, dynamic duration, Vegas, config reload).grep -ri soccershows only intentional fork-lineage comments.update_registry.py --dry-runreports the registry in sync.check_plugin.pycross-size harness / golden images (requires a LEDMatrix core checkout — none available in this environment).🤖 Generated with Claude Code