Skip to content

Release 0.3.0: the primitives layer — and fix the wheel guard and version drift first #63

Description

@fsecada01

v0.2.0 shipped the 14 structural components. Everything since is the primitives layer, and it is substantial enough to be its own minor release.

What is in it

The one upgrade note that matters

#56 changes what cf_ui_head emits for daisy consumers: it now injects Tailwind's Play CDN script alongside the daisyUI stylesheet, because the stylesheet is the component layer only and never the utility layer the shipped templates depend on for layout. A consumer who already has a real Tailwind build will get a script tag they did not have in 0.2.0 — CF_UI_DAISY_CDN = "off" is the opt-out. Not an API break, but it belongs in the release notes rather than in the middle of the changelog.

Two things to fix first, both in the release plumbing

Neither is caused by this release — both have been latent since #52 — but a PyPI upload can only be yanked, never replaced, so they get fixed before the tag rather than after.

1. The wheel guard cannot catch what it exists to catch. release.yml asserts >= 14 JinjaX templates, >= 14 cotton wrappers and >= 14 cotton theme partials. The real counts are now 21 wrappers, 105 jinja, 105 partials. A packaging regression that dropped all 7 primitives from every theme would leave exactly 14 per theme and pass the guard. Its required-assets list also never picked up cf_ui/static/cf_ui/cf_ui_primitives.json, added in #52.

Bumping the magic numbers only moves the staleness to the next component. The mechanism should be replaced: assert the wheel contains every template and static asset present in src/, derived at build time. That cannot go stale, and it catches one dropped file rather than only a dropped fourteen.

2. The version is declared twice and only one is checked. pyproject.toml and src/cf_ui/_version.py both carry it, and the tag-match step in release.yml reads only pyproject.toml. Miss _version.py in a bump and cf_ui.__version__ reports the wrong version indefinitely with nothing failing.

Acceptance criteria

  • Version bumped to 0.3.0 in both pyproject.toml and src/cf_ui/_version.py.
  • CHANGELOG.md's [Unreleased] rolled into [0.3.0] with the date.
  • The wheel guard derives its expectations from the source tree instead of hardcoded counts, and fails if the source scan itself finds nothing — a guard whose input silently becomes empty passes vacuously, which is the exact failure mode being replaced.
  • cf_ui_primitives.json covered by that guard.
  • A test asserts pyproject.toml's version and cf_ui.__version__ agree, running in the normal CI suite rather than only at release time.
  • Proven non-vacuous: break each new guard deliberately and watch it fail before relying on it.
  • Tag v0.3.0 pushed; publish waits on the pypi environment gate as designed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions