Repository navigation
fix(ui): build the Citry UI wheel's expected file list from the source tree - #477
Merged
Merged
Conversation
…e tree qualify_wheel.py kept a hand-written list of every file the Citry UI wheel ships, so each new module had to be added to it, and forgetting turned main red (#406 with components/_reveal.py). The list is now read from the checkout, using the rules from pyproject.toml restated a little more strictly in the qualifier: every module and minified asset under citry_ui/ outside quality/, snippets/, tests/ and tools/ at any depth, plus py.typed, and the citry_ui_i18n modules and package data. The built wheel is still compared with it, so a packaging rule that drops or adds a file still fails, and a mismatch error now names both places to check. A new file that matches these rules ships without a list edit, so review of new shipped files relies on the diff. The qualifier never ships and already read the package license from the checkout beside it, so it always runs in a checkout; without the source tree it now says where it looked. The derived lists equal the old hand lists on main (267 and 9 files). Tests cover the rules on a synthetic tree, a new component and locale needing no edit, and the missing-tree error; the tests that only listed files known to ship are removed, since the list now comes from the tree. Closes #416. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Closes #416.
Problem
qualify_wheel.pykeptEXPECTED_RUNTIME_FILESandEXPECTED_I18N_FILES, hand-written lists of every file the Citry UI wheel ships. Each new module needed a line there, and forgetting turnedmainred, as #406 did withcomponents/_reveal.py.Change
The two lists are now read from the checkout:
*.py,*.min.cssand*.min.jsundercitry_ui/outsidequality/,snippets/,tests/andtools/, pluspy.typed, and thecitry_ui_i18nmodules and package-data globs.pyproject.tomla little more strictly. The walk skips those folders at any depth, whilepyproject.tomlexcludes them only at the top level and inside each component. A file that only one side accepts fails the check, and the error names both places to look.The downloaded-wheel question from the issue
This case doesn't arise, and release artifacts don't change.
quality/is excluded from both the wheel and the sdist, so the qualifier itself never ships.LICENSEfrom the checkout next to it.py--tests.yml,verify_citry_ui_distribution.pyin the publish workflow, and the README command.Evidence
main's hand lists exactly (267 and 9 files) on Python 3.11, 3.12 and 3.14.components/qualified with no edit.pyproject.tomlfour ways to drop or add files: excluding a component, dropping*.min.js, dropping_compiled/*.json, and removing the tests exclude. All four failed with an accurate file list.uv buildof the wheel and sdist passesverify_citry_ui_distribution.py --skip-install-smoke. One note: a stalecitry_ui.egg-infoleft over from an earlier local build can add files to a local sdist. CI uses fresh checkouts, so it is not affected.--platform linux.🤖 Generated with Claude Code