Repository navigation
scoreboards: use core's favorite_team_check and sports_timezone when available (sports consolidation stage 2) - #565
Merged
Conversation
…the core ships them (sports consolidation stage 2) Core promotes two files the scoreboards carry as copies (LEDMatrix claude/sports-stage2-core): src.common.favorite_team_check and src.common.sports_timezone. Adopt them B5-style, keeping the copies as the fallback so the floors stay at 3.5.0: - afl, baseball, basketball, football, hockey, lacrosse, nrl: manager.py imports FavoriteTeamCheck from core under the usual guard (exc.name names the exact module), falling back to <sport>_favorite_check.py, which is unchanged. - The same seven plus soccer and ufc: <sport>_timezone.py ends in a guarded shim. On a core with the module it rebinds resolve_timezone_name, resolve_timezone and system_timezone_name to core's, passing this plugin's label and write-back values and its own logger; otherwise the code above it, byte-for-byte unchanged, is what runs. Call sites are untouched. - test_timezone_resolution.py stubs system_timezone_name on whichever module the resolver reads it from, so it tests the path in use. Patch bumps with versions[] entries (2026-09-29), CHANGELOGs, registry. f1-scoreboard's f1_timezone.py fits core's module (it differs only in label) but is left alone: whether it adopts is an owner decision. soccer and ufc still have no favourite-team check (adding one is a feature change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; table entries for the two modules - scripts/test_timezone_and_favorite_check_copies.py: the favourite-check copies must be byte-identical and equal core's module as an AST (annotations aside); every timezone copy's helpers must equal core's, and its resolver must return the same zone and log the same records as core's given its values, across 1,000+ scenarios; each adopter must import core's modules through the exact-name guard, and on a core that has them resolve through core with the same results as its own fallback. The core comparisons skip without a core that ships both modules. - check_min_core_version.py: src.common.favorite_team_check and src.common.sports_timezone as None (on core main, in no tagged release). - docs 08: the two copy families and how they converge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced 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 | 148 |
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.
ChuckBuilds
marked this pull request as ready for review
September 29, 2026 13:05
…flakes and pylint Comment-only; the AST of every file is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 2 of the sports-code consolidation, plugin side. Depends on ChuckBuilds/LEDMatrix#665: plugins CI checks out core main, and the new
check_min_core_versiontable entries need that PR's modules. Merge #665 first.Each scoreboard now uses core's
src.common.favorite_team_checkandsrc.common.sports_timezonewhen the running core has them. On older cores, including 3.5.0, it falls back to its own copy. The bundled copies stay until core 3.6.0 is released. After that, a follow-up raises the minimum core version and deletes them (about 4,100 lines).Changes
manager.pyimportsFavoriteTeamCheckfrom core. The import has the usual exact-nameModuleNotFoundErrorguard and falls back to<sport>_favorite_check.py, which is unchanged.<sport>_timezone.py. The code above it is byte-unchanged and serves as the fallback.logis given, it passes the plugin module's logger, so log records keep their logger name.test_timezone_resolution.pynow stubs the system-timezone lookup on whichever module actually resolves it. Otherwise the tests would check the wrong code on the core path.scripts/test_timezone_and_favorite_check_copies.py:versions[]entries, CHANGELOGs,plugins.json). The minimum core version stays at 3.5.0.check_min_core_version.pygets entries for both modules as unreleased (None), and doc 08 is updated.Verification
Compared against origin/main plugins on core v3.5.0, on both paths: this PR on core #665 (core path) and on core v3.5.0 (fallback).
run_plugin_tests.pygives 322 passed on all three configurations. The same 2 failures happen on main: baseballtest_odds_placementand football's interactivetest_football_plugin.scripts/test_*.pyand check script matches main. The one exception istest_check_min_core_version, whose new entries need fix(football): a two-point conversion is not a safety (3.28.1) #665's modules.check_version_bumppasses naming all 9 ids, and so doupdate_registry --check, the helpers parity check and the drift check.src.common.*. On v3.5.0 each resolves to the bundled module.FavoriteTeamCheckresolves to core.Not changed (owner decisions)
🤖 Generated with Claude Code