Skip to content

Add NRL scoreboard plugin#182

Open
ChuckBuilds wants to merge 1 commit into
mainfrom
claude/nrl-scoreboard
Open

Add NRL scoreboard plugin#182
ChuckBuilds wants to merge 1 commit into
mainfrom
claude/nrl-scoreboard

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

Summary

Adds a new NRL (National Rugby League) scoreboard plugin (plugins/nrl-scoreboard), forked from soccer-scoreboard and collapsed to a single league. It shows live, recent, and upcoming NRL games with full feature parity to the other sports scoreboards.

Behavior

  • Display modes: nrl_live, nrl_recent, nrl_upcoming, each independently toggleable and renderable as switch (one game at a time) or scroll (high-FPS horizontal).
  • Live-game priority + goal/win celebration takeover.
  • Dynamic per-mode durations and fixed mode_durations.
  • Vegas continuous-scroll hooks (get_vegas_content_type'multi').
  • Team logos auto-download from ESPN's CDN (no bundled assets); text placeholder on failure.

Data source & the 3 slug quirk

Games come from:

https://site.api.espn.com/apis/site/v2/sports/rugby-league/3/scoreboard

sport = "rugby-league", league = "3". 3 is ESPN's internal numeric slug for the NRL — the human-facing web path is /nrl/, but the API path segment is the literal string 3 (confirmed via site.web.api.espn.com/apis/v2/scoreboard/header?sport=rugby-leagueid:8370, abbreviation:"NRL", slug:"3"). Changing it to nrl 404s 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 in sports.py was genericized to key off sport_key ("nrl").
  • nrl_managers.py: ESPN fetch + NRL period parsing; single create_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 full customization block.
  • plugins.json registry entry added.

Test plan

  • python3 -m py_compile all .py in plugins/nrl-scoreboard/ — passes.
  • manifest.json, config_schema.json, test/harness.json, plugins.json all parse.
  • Live endpoint rugby-league/3/scoreboard returns HTTP 200; parser handles the real fields (scores, abbreviations, status.type.state/period/displayClock).
  • Self-contained smoke test (test_nrl_plugin.py) passes (6/6): manifest/schema/harness invariants + the 3-slug guard + period-mapping.
  • manager.py control flow exercised end-to-end with stubbed deps (init, update, live-priority, switch/scroll/cycle display, dynamic duration, Vegas, config reload).
  • grep -ri soccer shows only intentional fork-lineage comments.
  • update_registry.py --dry-run reports the registry in sync.
  • Not run: the core check_plugin.py cross-size harness / golden images (requires a LEDMatrix core checkout — none available in this environment).
  • Not run: live on-device install via the plugin store (devpi/ledpi).

🤖 Generated with Claude Code

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
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ChuckBuilds, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a2f04669-54a7-4354-9cd6-bff2413c0d1a

📥 Commits

Reviewing files that changed from the base of the PR and between 25780e7 and 3ecd41d.

📒 Files selected for processing (17)
  • plugins.json
  • plugins/nrl-scoreboard/.gitignore
  • plugins/nrl-scoreboard/LICENSE
  • plugins/nrl-scoreboard/README.md
  • plugins/nrl-scoreboard/base_odds_manager.py
  • plugins/nrl-scoreboard/config_schema.json
  • plugins/nrl-scoreboard/data_sources.py
  • plugins/nrl-scoreboard/dynamic_team_resolver.py
  • plugins/nrl-scoreboard/game_renderer.py
  • plugins/nrl-scoreboard/manager.py
  • plugins/nrl-scoreboard/manifest.json
  • plugins/nrl-scoreboard/nrl_managers.py
  • plugins/nrl-scoreboard/requirements.txt
  • plugins/nrl-scoreboard/scroll_display.py
  • plugins/nrl-scoreboard/sports.py
  • plugins/nrl-scoreboard/test/harness.json
  • plugins/nrl-scoreboard/test_nrl_plugin.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/nrl-scoreboard

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 3 high · 2 medium

Alerts:
⚠ 5 issues (≤ 0 issues of at least minor severity)

Results:
5 new issues

Category Results
ErrorProne 3 high
Security 2 medium

View in Codacy

🟢 Metrics 1170 complexity

Metric Results
Complexity 1170

View in Codacy

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant