Skip to content

fix(ui): build the Citry UI wheel's expected file list from the source tree - #477

Merged
JuroOravec merged 1 commit into
mainfrom
fix/citry-ui-wheel-list-from-source
Oct 28, 2026
Merged

JuroOravec merged 1 commit into
mainfrom
fix/citry-ui-wheel-list-from-source

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Closes #416.

Problem

qualify_wheel.py kept EXPECTED_RUNTIME_FILES and EXPECTED_I18N_FILES, hand-written lists of every file the Citry UI wheel ships. Each new module needed a line there, and forgetting turned main red, as #406 did with components/_reveal.py.

Change

The two lists are now read from the checkout:

  • What is listed: every *.py, *.min.css and *.min.js under citry_ui/ outside quality/, snippets/, tests/ and tools/, plus py.typed, and the citry_ui_i18n modules and package-data globs.
  • Stricter than packaging: these rules restate pyproject.toml a little more strictly. The walk skips those folders at any depth, while pyproject.toml excludes 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 check still bites: the built wheel is still compared with the list, so a packaging rule that drops or adds a file still fails.
  • The trade-off: a new file that matches these rules ships without any list edit, so reviewing newly shipped files now relies on the diff.

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.
  • The qualifier already read the package LICENSE from the checkout next to it.
  • Every caller runs it in a checkout of the same commit: both steps in py--tests.yml, verify_citry_ui_distribution.py in the publish workflow, and the README command.
  • If the source tree is missing, the qualifier now raises an error that names where it looked, rather than passing on an empty list.

Evidence

  • The lists read from the tree equal main's hand lists exactly (267 and 9 files) on Python 3.11, 3.12 and 3.14.
  • A probe module added under components/ qualified with no edit.
  • An independent reviewer edited pyproject.toml four 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.
  • A real uv build of the wheel and sdist passes verify_citry_ui_distribution.py --skip-install-smoke. One note: a stale citry_ui.egg-info left over from an earlier local build can add files to a local sdist. CI uses fresh checkouts, so it is not affected.
  • The qualifier tests pass (13; the subset tests that only listed known files are removed). ruff and mypy pass, including --platform linux.
  • An independent review was done, and its findings are folded in.
  • Cargo is left to CI.

🤖 Generated with Claude Code

…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]>
@JuroOravec
JuroOravec merged commit 819481d into main Oct 28, 2026
28 of 32 checks passed
@JuroOravec
JuroOravec deleted the fix/citry-ui-wheel-list-from-source branch October 28, 2026 11:49
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.

Citry UI wheel check: derive the shipped-file list from the source tree

1 participant