Repository navigation
f1: resolve the timezone through core's sports_timezone; core 3.6.0 ships both stage 2 modules - #567
Merged
Merged
Conversation
…en the core ships it (1.9.6) f1_timezone.py is the same code as core's src.common.sports_timezone apart from its label and write-back values, so it gets the guarded shim the nine scoreboards got in stage 2: on a core with the module, resolve_timezone_name, resolve_timezone and system_timezone_name point at core's, given "F1 scoreboard", this plugin's write-back values and its own logger; otherwise the code above the shim, byte-unchanged, runs. The shim carries the same pyflakes and pylint markers as the others. - test_timezone_resolution.py stubs system_timezone_name on whichever module the resolver reads it from, as the others do. - scripts/test_timezone_and_favorite_check_copies.py: f1 joins ADOPTERS, so the guard shape and "core path == fallback path" checks cover it (it was already compared with core in the helper and resolver checks). - docs 08: all ten timezone copies now end in the shim. Patch bump with a versions[] entry; the floor stays 3.4.0 (f1's own). f1 keeps its history in versions[] and has no CHANGELOG.md, so none is added. No behaviour change: every harness render is byte-identical on both paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one; docs 08 on soccer and ufc Core v3.6.0 (a11412da) is tagged and ships both stage 2 modules (core #665), so check_min_core_version.py dates them "3.6.0" instead of None, and the tag test tracks v3.6.0. Verified against the tag: the table test passes with LEDMATRIX_CORE at v3.6.0 and at v3.5.0. No plugin floor changes; the sunset that floors the scoreboards on 3.6.0 and deletes the copies is separate. docs 08: the modules are in core 3.6.0 and later, and the favourite-check row says why soccer and ufc are not on core's check: - soccer keeps the older check in its manager.py (the one #233 added, which the shared module grew out of). Core's check reads a mid-season break as a finished season: out of season it treats "every event in the past" as the end of the season, but ESPN's soccer scoreboard shows the last matchday until the next one, so today (Premier League, last games 20 September, next 10 October, calendar running to May 2027) it would log "the season has finished". Soccer's own check says nothing then. Adopting core's needs that fixed in core first. - ufc has no favourite check. Its favourites are fighter names and weight classes, and ESPN's mma/ufc teams endpoint returns an empty list, so the check could never say anything. 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 | 4 |
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
added a commit
that referenced
this pull request
Sep 29, 2026
… timezone code (stage 2 sunset) (#570) * chore(scripts): track core v3.6.1 in the core-floor table's tag test Core v3.6.1 (e5bbfa2a) is tagged. It adds no src module (only the favourite check's finished-season fix, core #667), so no table entry changes: MODULE_FIRST_VERSION records the first release that ships a module, and favorite_team_check stays 3.6.0. A comment says why the scoreboards floor on 3.6.1 anyway. The tag test tracks v3.6.1, and REPORTED_AS's note records that it reports "3.6.1". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * scoreboards + f1: floor on core 3.6.1 (minor bumps) afl 1.33.0, baseball 1.52.0, basketball 1.39.0, football 3.16.0, hockey 1.38.0, lacrosse 1.34.0, nrl 1.32.0, soccer 2.36.0, ufc 1.17.0, f1 1.10.0. versions[0].ledmatrix_min_version and compatible_versions rise to 3.6.1 (from 3.5.0; f1 from 3.4.0). 3.6.0 is the first release that ships src.common.favorite_team_check and src.common.sports_timezone; 3.6.1 is the first whose favourite check has the finished-season fix (core #667) that the plugins' bundled copies already carried (#566), so it is the lowest floor at which deleting those copies changes nothing. soccer, ufc and f1 use only sports_timezone, for which 3.6.0 would do; they take 3.6.1 too so the sports scoreboards share one floor. f1 imports nothing that 3.6.1 lacks (check_min_core_version and check_core_api_signatures pass, and its harness renders on 3.6.1 are byte-identical). The next commit deletes the bundled code; the versions[] notes and CHANGELOG entries describe both. f1 keeps its history in versions[] and has no CHANGELOG.md, as in #567; its README's core requirement is updated. A floor raise is a minor bump, as for the 3.2.0-3.5.0 raises before it. plugins.json regenerated with update_registry.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * scoreboards + f1: delete the bundled favourite check and timezone resolver; use core's plainly The plugins floor on core 3.6.1, which ships both modules, so the fallbacks kept for older cores can never run again. Favourite check (afl, baseball, basketball, football, hockey, lacrosse, nrl): <sport>_favorite_check.py is deleted (7 x 369 lines) and the guard in manager.py collapses to a plain `from src.common.favorite_team_check import FavoriteTeamCheck` -- a try/except with nothing behind it would only hide which module was missing. On a 3.6.x core the guard already took the core branch, and on origin/main the copies equalled core v3.6.1's module as ASTs (the old guard script checked exactly that). Timezone (those seven + soccer, ufc, f1): <sport>_timezone.py keeps its name, its public functions and their signatures, so sports.py, game_renderer.py, manager.py and the tests are unchanged; it drops the ~230-line fallback resolver and its guarded shim and becomes a binding of core's src.common.sports_timezone: this plugin's label and write-back release in _CORE_ARGS, and `log or logger`, so records still go to the module's own logger ("<sport>_timezone") as on today's core path. `system_timezone_name` stays as a name for core's. What leaves the module: os, pytz, _from_config_manager, _validated, _HAD_WRITEBACK_BUG and _WRITEBACK_FIXED_IN (only the module itself and the guard script read them; the two constants become the one writeback_fixed_in value). Tests: - test_timezone_resolution.py (x10) stubs system_timezone_name on `<sport>_timezone._core` directly; there is no bundled branch left. - hockey's test_favorite_check.py and football's test_schedule_note_uses_game_dates.py are deleted. They tested the bundled copy; core's test/test_favorite_team_check.py was ported from both (its docstring says so) and has every case but hockey's copies-are-identical one, which has nothing left to compare. - scripts/test_timezone_and_favorite_check_copies.py is now a sunset guard, in the shape of test_espn_dates_copies.py: for FAVORITE_SUNSET no copy may come back (anywhere under plugins/), no bare *_favorite_check import, no guarded core import, and manager.py must import core's; for every timezone module, the core import is unguarded and its only functions are the two resolvers, each returning core's function of the same name. With a core checkout it runs each binding against core given the label / write-back release in its BINDINGS table and the module's logger, over the old guard's 972-scenario grid, comparing zones and every log record. An import-finder self-check plants four shapes. No behaviour change: on core v3.6.1, versus origin/main, every harness render is byte-identical (240 PNGs, 10 plugins); every plugin test gives the same result (the two deleted ones aside); and each module's two resolvers give identical zones and log records (logger, level, text, exc_info) over the 972 scenarios x 2 resolvers, captured on the root logger. FavoriteTeamCheck resolves to src.common.favorite_team_check in all seven managers, before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: stage 2 sunset -- favourite check and timezone on core 3.6.1 docs 08: no favourite-check copies are left, and each <sport>_timezone.py is a thin binding of core's resolver (label, write-back release, logger) that the guard script pins; the convergence list moves both modules from "adopted with a fallback" to converged at 3.6.1. CLAUDE.md non-negotiable #7: the scoreboards floor on 3.6.1 and use both modules from core (soccer and ufc have no favourite check on core's module). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- 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.
A follow-up to #565. Core v3.6.0 is now released, with
src.common.favorite_team_checkandsrc.common.sports_timezone.Changes
f1_timezone.pygets the same guarded shim as the other nine scoreboards, labelled "F1 scoreboard" and passing its own write-back values.test_timezone_resolution.pystubs the system zone on whichever module actually resolves it.ADOPTERS, so the guard-shape check and the core-path == fallback check cover it.versions[]and has no CHANGELOG.md.check_min_core_version.py: both modules are now dated "3.6.0", and its test tracks the v3.6.0 tag.No floors are raised and no copies are deleted; that's the separate cleanup PR.
Not included: the favourite-team check for soccer and ufc
mma/ufc/teamsendpoint returns no teams, so the check would never report anything.Verification
Baseline origin/main. Core path is v3.6.0, fallback path is v3.5.0.
run_plugin_tests.pygives 68 passed on both cores.scripts/test_*.pyand check scripts pass on both, includingcheck_version_bump --base origin/main f1-scoreboardandupdate_registry.py --check.🤖 Generated with Claude Code