Skip to content

chore(ci): add theme validator, tooling scripts, and assorted theme fixups#101

Merged
pfeerick merged 8 commits intomainfrom
feat/theme-validator
Apr 23, 2026
Merged

chore(ci): add theme validator, tooling scripts, and assorted theme fixups#101
pfeerick merged 8 commits intomainfrom
feat/theme-validator

Conversation

@pfeerick
Copy link
Copy Markdown
Member

@pfeerick pfeerick commented Apr 23, 2026

Summary

  • Add tools/validate_themes.py: validates theme structure against spec (required files, colors, background resolutions, optional keys). Runs in CI before packaging.
  • Add tooling dependencies via uv/pyproject.toml (pyyaml, rich, pillow) and project-level Ruff config (line length 100).
  • Add tools/generate_logo.py for simple logo generation.
  • Theme fixups: regenerate Carbon_Red 800×480 and add 320×480 portrait, rename background.pngbackground_480x272.png for debian_dark/debian_light/Nirvana_Space, add missing DZARODarkPurple logo, minor BrushedAluminum theme.yml fix.
  • Update CONTRIBUTING.md with "Validating your theme locally" section.

Validator currently reports 56/58 themes passing after these fixups.

Test plan

  • uv run python tools/validate_themes.py passes with expected counts
  • uv run python tools/validate_themes.py --strict exit code matches error count
  • CI workflow build_release.yml runs the validator step green
  • Visually verify Carbon_Red backgrounds on-device (or in a sim) at 800×480 and 320×480

🤖 Generated with Claude Code

pfeerick and others added 8 commits April 23, 2026 16:40
- Add tools/validate_themes.py: validates theme structure against spec
  - Errors (block CI): missing/invalid theme.yml, missing required files, invalid colors
  - Warnings (printed): missing background resolutions, missing QM_BG/QM_FG, extra files
  - CLI: --theme NAME, --themes-dir DIR, --strict
  - Uses rich for color-coded output
  - PEP 723 script with automatic uv dependency management (pyyaml, rich)
- Update .github/workflows/build_release.yml to run validation before packaging
  - Sets up Python 3.12 and uv, runs validator as CI step
- Update CONTRIBUTING.md with "Validating your theme locally" section
  - Documents how to run validator before submitting
  - Explains error vs warning distinction

Current state: 56/58 themes valid, 2 errors (DZARODarkPurple missing logo,
BrushedAluminum missing info), widespread optional key warnings.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…onfig

- treat unexpected files and missing all backgrounds as info
- treat partial background resolution sets as errors
- show info details only with verbose while keeping info counts in summary
- make optional color-key checks run only with verbose
- add project-level Ruff line length configuration (100)
Moves the validator out of the package job so it runs as a distinct,
clearly-named gate before packaging. Package now depends on validate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@pfeerick pfeerick changed the title Add theme validator, tooling scripts, and assorted theme fixups chore(ci): add theme validator, tooling scripts, and assorted theme fixups Apr 23, 2026
@pfeerick pfeerick merged commit ff48d23 into main Apr 23, 2026
5 checks passed
@pfeerick pfeerick deleted the feat/theme-validator branch April 23, 2026 10:37
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