mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-16 11:59:13 +00:00
* feat(common): sports_view_model -- the reconciled game view model (sports family 10)
New hardware-free module src/common/sports_view_model.py, copied from
ledmatrix-plugins claude/family10-reconcile once the nine scoreboards made
_extract_game_details_common (nine bodies) one. It lives on the plugins'
SportsCore, so one mixin, SportsViewModelMixin, carries exactly that method,
the helpers it calls (_status_is_final, _score_text, _team_logo_url,
_extract_team_record), the _logo_filename seam and the two status-name
sets; no manager gains a method it lacks today. The module docstring lists
every key of the game dict with its type and default; keys are additive
only.
Owner decisions (2026-10-13):
- One final rule: state "post", not completed: false (a payload without
the flag is judged on state and name), and not a not-played status (the
union of the nine lists). A forfeit is final. A called-off game is never
live, even while ESPN still reports it "in".
- Scores are integer text everywhere; a missing, empty or non-numeric
score is "0".
- A time without an offset is UTC.
- Halftime reads "HALF" with no clock (each sport's own extractor; not in
this module).
- Superset with safe defaults: period (0) and clock (""). period_text has
none: the renderers read its absence (baseball) as "draw ESPN's status
text", and an empty default blanked baseball's Recent "Final" in the
harness.
- test/test_sports_view_model.py: the plugins' pinned cases (states, the
final rule, scores, records, logos, ids, broadcast, dates, offsets, DST,
malformed events), the seam, and the host contract (every self read
documented, every key in the docstring's table). Mutation-checked (11
mutants, all caught).
- test/test_sports_view_model_parity.py: with LEDMATRIX_PLUGINS, compares
each method and both status sets with every plugin copy. Passes against
claude/family10-reconcile; fails against the pre-reconcile tree.
- test_sports_twins.py, sports_card and sports_game_renderer tests pass
with the reconciled plugins as the corpus.
- mypy ratchet, src/common/README.md, CHANGELOG (Unreleased: New modules),
docs/SPORTS_UNIFICATION.md family 10 status and decisions, and the
_logo_filename seam in the override-points table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: cite ledmatrix-plugins #654 for the family 10 reconcile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(sports): view-model parity requires SportsCore to inherit the mixin
A plugin without a copy counted as adopted if its source merely mentioned
the module. It now also has to list SportsViewModelMixin among SportsCore's
bases (CodeRabbit on #796).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
112 lines
3.5 KiB
Plaintext
112 lines
3.5 KiB
Plaintext
# The mypy ratchet: modules that type-check clean, one path per line, sorted.
|
|
#
|
|
# CI ("Type check (mypy ratchet)") runs `python scripts/check_types.py`, which
|
|
# runs mypy on exactly these files (imports followed silently, so errors in an
|
|
# unlisted module they import don't count) and fails on any error, so a listed
|
|
# module stays clean. Most of src/ isn't clean yet. When you make a module
|
|
# clean, add it here. Don't take a module off to get CI green -- fix the error
|
|
# (annotation-only where you can: hints, typing.cast, TYPE_CHECKING imports;
|
|
# widen an annotation rather than delete a defensive runtime check).
|
|
|
|
src/__init__.py
|
|
src/adaptive_images.py
|
|
src/auto_update_setup.py
|
|
src/backup_manager.py
|
|
src/base_odds_manager.py
|
|
src/cache/__init__.py
|
|
src/cache/cache_strategy.py
|
|
src/cache/memory_cache.py
|
|
src/common/__init__.py
|
|
src/common/api_helper.py
|
|
src/common/bdf_font.py
|
|
src/common/espn_dates.py
|
|
src/common/favorite_team_check.py
|
|
src/common/fetch_service.py
|
|
src/common/font_layout.py
|
|
src/common/frame_timing.py
|
|
src/common/json_body.py
|
|
src/common/logo_helper.py
|
|
src/common/path_safety.py
|
|
src/common/permission_utils.py
|
|
src/common/render_gate.py
|
|
src/common/scroll_config.py
|
|
src/common/snapshot_policy.py
|
|
src/common/sports_card.py
|
|
src/common/sports_card_wrappers.py
|
|
src/common/sports_celebration.py
|
|
src/common/sports_display_rules.py
|
|
src/common/sports_favorites.py
|
|
src/common/sports_fetch.py
|
|
src/common/sports_font_path.py
|
|
src/common/sports_game_over.py
|
|
src/common/sports_live_fetch.py
|
|
src/common/sports_live_scroll.py
|
|
src/common/sports_plugin_host.py
|
|
src/common/sports_rankings.py
|
|
src/common/sports_rotation.py
|
|
src/common/sports_scroll.py
|
|
src/common/sports_timezone.py
|
|
src/common/sports_vegas.py
|
|
src/common/sports_view_model.py
|
|
src/config_service.py
|
|
src/core_config_keys.py
|
|
src/deprecation.py
|
|
src/device_location.py
|
|
src/display_arbiter.py
|
|
src/display_geometry.py
|
|
src/dynamic_team_resolver.py
|
|
src/exceptions.py
|
|
src/font_usage.py
|
|
src/ipc/__init__.py
|
|
src/ipc/client.py
|
|
src/ipc/contract.py
|
|
src/ipc/server.py
|
|
src/logging_config.py
|
|
src/logo_downloader.py
|
|
src/malloc_tuning.py
|
|
src/matrix_support.py
|
|
src/pi5_matrix_support.py
|
|
src/plugin_system/__init__.py
|
|
src/plugin_system/compatibility.py
|
|
src/plugin_system/field_model.py
|
|
src/plugin_system/operation_history.py
|
|
src/plugin_system/operation_queue.py
|
|
src/plugin_system/operation_types.py
|
|
src/plugin_system/plugin_catalog.py
|
|
src/plugin_system/plugin_dirs.py
|
|
src/plugin_system/plugin_executor.py
|
|
src/plugin_system/plugin_health.py
|
|
src/plugin_system/plugin_loader.py
|
|
src/plugin_system/plugin_runtime.py
|
|
src/plugin_system/plugin_state.py
|
|
src/plugin_system/repo_urls.py
|
|
src/plugin_system/resource_monitor.py
|
|
src/plugin_system/saved_repositories.py
|
|
src/plugin_system/schema_manager.py
|
|
src/plugin_system/state_reconciliation.py
|
|
src/plugin_system/testing/__init__.py
|
|
src/plugin_system/testing/bounds_display_manager.py
|
|
src/plugin_system/testing/loading.py
|
|
src/plugin_system/testing/mocks.py
|
|
src/plugin_system/testing/plugin_test_base.py
|
|
src/plugin_system/testing/sizes.py
|
|
src/plugin_system/testing/vegas.py
|
|
src/plugin_system/vegas_elements.py
|
|
src/redaction.py
|
|
src/scan_order.py
|
|
src/screen_runner.py
|
|
src/startup_validator.py
|
|
src/vegas_mode/__init__.py
|
|
src/vegas_mode/config.py
|
|
src/vegas_mode/coordinator.py
|
|
src/vegas_mode/elements.py
|
|
src/vegas_mode/geometry.py
|
|
src/vegas_mode/live_worker.py
|
|
src/vegas_mode/stream_manager.py
|
|
src/web_interface/api_helpers.py
|
|
src/web_interface/config_arrays.py
|
|
src/web_interface/error_handler.py
|
|
src/web_interface/errors.py
|
|
src/web_interface/secret_helpers.py
|
|
src/web_interface/validators.py
|