dazzle-lib v0.8.2
Bedrock primitives for the DazzleLib stack: the Unified ↔ Groupable ↔ Continuum ↔ ContinuumSpace value ladder, protocols, and the rank/axis machinery every higher layer builds on.
What's New in v0.8.2 (the 0.8.1 + 0.8.2 pair)
The nucleus and framing — every ladder type knows its invariant seat
nucleus() returns the conserved center (the 0-seat's meaning); framing() names the perspective a continuum is read under. The {-1, 0, +1} thesis lands in code: a Groupable is {minus, plus, meaning}, and the meaning seat is addressable.
Continuum subtypes — the struct declares its shape
subtype ∈ {full | monopole | list} with sign-structure validation: full requires reaches on both sides of 0, monopole exactly one, list is the sanctioned home of truthful ordinals (a numeric NAME must equal its rank — the truth guard).
Continuum("visibility", ranks={"visible": 0, "silenced": -1, "hidden": -2}, subtype="monopole")Rank addressability
level_at(rank, nearest=) and rank_name(rank) — positions answer by number; anonymous rungs self-name by their rank spelling ("5/2"), and rename_level christens them later without moving anything.
Insertion without renumbering — or with it, side-aware
densify_between gains integer mediants and optional naming; shift_from(rank, by) renumbers one side only (the pivot's sign selects the side; the invariant seat is unmovable). Named collisions raise loudly; from_groupable declares subtype="full".
Test hardening (pre-tag additions)
PEP 440 .devN tails accepted without a phase marker; the densified-rank serialization seam documented as a repro (densify_between promotes whole-number mediants to Fraction, breaking JSON downstream — fix scheduled with the countable-christening work); the nucleus/rank-addressing human checklist ships in tests/checklists/.
Installation
pip install dazzle-libVersion History (0.8.x)
| Version | Key Change |
|---|---|
| v0.8.2 | Current — nucleus/subtypes/rank addressing + tester-findings fixes |
| v0.8.1 | nucleus()/framing(), level_at, the subtype field, side-aware shift_from (no standalone release) |
| v0.8.0 | The bedrock CONTRACT protocols — "bedrock declares, consumer adheres" (no standalone release) |
Earlier lines: v0.6.7 (the SH base-object redesign) · v0.1.0 (protocols, payload schemas, exception root).
Platform Support
| Platform | Status |
|---|---|
| Windows | Tested |
| Linux / macOS / BSD | Expected to work (pure Python, no platform calls) |
Requirements
Python 3.10+. Zero runtime dependencies.
137 tests passing at the tag.