chore(ci): add theme validator, tooling scripts, and assorted theme fixups#101
Merged
chore(ci): add theme validator, tooling scripts, and assorted theme fixups#101
Conversation
- 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>
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.
Summary
tools/validate_themes.py: validates theme structure against spec (required files, colors, background resolutions, optional keys). Runs in CI before packaging.uv/pyproject.toml(pyyaml, rich, pillow) and project-level Ruff config (line length 100).tools/generate_logo.pyfor simple logo generation.background.png→background_480x272.pngfor debian_dark/debian_light/Nirvana_Space, add missing DZARODarkPurple logo, minor BrushedAluminum theme.yml fix.CONTRIBUTING.mdwith "Validating your theme locally" section.Validator currently reports 56/58 themes passing after these fixups.
Test plan
uv run python tools/validate_themes.pypasses with expected countsuv run python tools/validate_themes.py --strictexit code matches error countbuild_release.ymlruns the validator step green🤖 Generated with Claude Code