Skip to content

chore: remove dead modules and unused dependencies (~1,180 LOC) - #412

Merged
ChuckBuilds merged 3 commits into
mainfrom
chore/dead-code-removal
Jul 15, 2026
Merged

chore: remove dead modules and unused dependencies (~1,180 LOC)#412
ChuckBuilds merged 3 commits into
mainfrom
chore/dead-code-removal

Conversation

@ChuckBuilds

@ChuckBuilds ChuckBuilds commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

PR 8 (final) of the performance/efficiency series — migration leftovers from the pre-plugin manager era.

Deleted modules (each re-grepped across core + web + scripts + docs + the plugin monorepo immediately before removal): background_cache_mixin + generic_cache_mixin (mutual-only references), font_test_manager, image_utils (self-documented deprecated), layout_manager + its test (only importer), basketball_plugin_example. ~1,180 LOC.

Dropped requirements (zero core importers): icalevents, geopy, timezonefinder (the inline comment claiming use was stale), unidecode — plus the google-auth trio, whose only importer is the calendar plugin, which declares all three in its own requirements.txt (verified in the monorepo and on a live installed copy). The plugin dependency installer owns them; existing venvs are unaffected, fresh installs get them with the plugin. Meaningful install-size/time reduction on a Pi.

⚠️ One changelog-worthy caveat: any third-party plugin that silently relied on these being preinstalled in the shared venv (instead of declaring them) would need to add them to its own requirements — that's the contract plugins are supposed to follow.

Verification

Fresh pre-deletion re-grep for every item (which caught that the google libs gained an importer since the original audit — the calendar plugin — and changed the handling accordingly); full test suite green minus the two documented pre-existing failures; all core entry modules import cleanly under the emulator.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FqzC1nzTWL4kaqgMaQZFam

Summary by CodeRabbit

  • Refactor

    • Removed legacy layout customization, font testing, image scaling, example basketball, and cache functionality.
    • Removed unused timezone geocoding, Google API, and calendar integration packages.
  • Documentation

    • Updated the test directory documentation to reflect the current test suite.
  • Tests

    • Updated Pillow compatibility test wording.
    • Removed obsolete layout manager tests.

Deletions, each re-verified with a fresh repo-wide grep (core, web,
scripts, docs, plugin monorepo) immediately before removal:

Modules with zero live importers:
- src/background_cache_mixin.py + src/generic_cache_mixin.py (134+150
  LOC — referenced only by each other)
- src/font_test_manager.py (134 LOC)
- src/image_utils.py (22 LOC, self-documented deprecated)
- src/layout_manager.py (408 LOC — only its own test imported it) +
  test/test_layout_manager.py
- src/common/basketball_plugin_example.py (328 LOC sample)

requirements.txt entries with zero importers in core (pre-plugin-era
manager deps): icalevents, geopy, timezonefinder, unidecode. Plus the
google-auth trio (google-auth-oauthlib, google-auth-httplib2,
google-api-python-client): their only importer is the calendar PLUGIN,
which declares all three in its own requirements.txt (verified in the
monorepo and on an installed copy) — the plugin dependency installer
owns them. Existing venvs are unaffected (removal doesn't uninstall);
fresh installs get them when calendar is installed.

Two stale references cleaned (a comment in test_pillow_compat.py, a
directory listing in HOW_TO_RUN_TESTS.md). Full suite green except the
two documented pre-existing failures (circuit_breaker mock drift, fixed
in #400; clock-simple 64x32 overflow, pre-dates this series); all core
entry modules verified importing cleanly under the emulator.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqzC1nzTWL4kaqgMaQZFam
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6646fd7-4fef-4bc7-8c21-a948773dd430

📥 Commits

Reviewing files that changed from the base of the PR and between 6edd80d and b0a404e.

📒 Files selected for processing (10)
  • docs/HOW_TO_RUN_TESTS.md
  • requirements.txt
  • scripts/dev/test_pillow_compat.py
  • src/background_cache_mixin.py
  • src/common/basketball_plugin_example.py
  • src/font_test_manager.py
  • src/generic_cache_mixin.py
  • src/image_utils.py
  • src/layout_manager.py
  • test/test_layout_manager.py
💤 Files with no reviewable changes (9)
  • src/image_utils.py
  • src/common/basketball_plugin_example.py
  • src/background_cache_mixin.py
  • test/test_layout_manager.py
  • src/generic_cache_mixin.py
  • src/font_test_manager.py
  • requirements.txt
  • docs/HOW_TO_RUN_TESTS.md
  • src/layout_manager.py

📝 Walkthrough

Walkthrough

Obsolete cache, layout, display, and image utility modules plus layout tests were removed. Unused timezone, Google API, and calendar dependencies were deleted, and related test documentation and Pillow compatibility labeling were updated.

Changes

Repository cleanup

Layer / File(s) Summary
Obsolete module removal
src/background_cache_mixin.py, src/generic_cache_mixin.py, src/layout_manager.py, src/image_utils.py, src/font_test_manager.py, src/common/basketball_plugin_example.py, test/test_layout_manager.py
Removes the obsolete runtime modules and the corresponding layout manager test suite.
Dependency and documentation alignment
requirements.txt, docs/HOW_TO_RUN_TESTS.md, scripts/dev/test_pillow_compat.py
Removes unused integration dependencies, removes the deleted layout test from the documented tree, and updates the Pillow resampling section label.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing dead modules and unused dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/dead-code-removal
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch chore/dead-code-removal

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.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@codacy-production

codacy-production Bot commented Jul 13, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

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.

…ommit

The previous commit's git add/commit swept in a lot of unrelated,
unreviewed work alongside the intended dead-code deletions: a new Plugin
Composer web UI, new security-audit/CI tooling, a new march-madness
plugin, and 23 local-development-only symlinks under plugin-repos/ (per
scripts/setup_plugin_repos.py's own docstring, these are meant to be
generated locally, never committed -- .gitignore has no entry for them,
which is how they slipped in).

Removed here, split into their own PRs instead (except plugin-repos/*
symlinks and march-madness/ncaa_logos, which are dropped rather than
carried forward -- see PR discussion):
- web_interface/blueprints/composer.py + composer-app.js +
  composer-canvas.js + composer.html + manager.py.j2
- scripts/prove_security.py, audit_plugins.py, generate_report.py
- .github/workflows/security-audit.yml, .github/workflows/tests.yml,
  bandit.yaml
- All plugin-repos/* symlinks (local dev artifacts, not meant to be
  committed at all)
- plugin-repos/march-madness/* and the 4 new assets/sports/ncaa_logos/*
  PNGs it needed (left out of every split PR pending a decision on
  whether march-madness belongs in the core repo or the plugin monorepo)

This PR now contains only what its title describes: the dead-code
removal from the previous commit, untouched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
ChuckBuilds added a commit that referenced this pull request Jul 15, 2026
…, LEHIGH, MICHIGAN, RUTGERS) (#415)

march-madness (already live in ledmatrix-plugins) loads team logos from
this shared assets/sports/ncaa_logos/<ABBR>.png cache at runtime
(manager.py:233) -- these 4 were missing.

Split out of PR #412 (chore/dead-code-removal), which had accidentally
bundled these in alongside unrelated dead-code deletions.


Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@ChuckBuilds
ChuckBuilds merged commit 2a1c47f into main Jul 15, 2026
7 checks passed
@ChuckBuilds
ChuckBuilds deleted the chore/dead-code-removal branch July 15, 2026 13:58
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.

2 participants