v0.0.23¶
New: Universe and ExposureMatrix¶
lythonic.universe.Universe is an immutable, ordered, duplicate-free sequence
of string keys naming one axis of a keyed matrix. It coerces from a plain list
and serializes back to one.
lythonic.exposure.ExposureMatrix is a sparse, string-keyed matrix relating
subjects to targets, with no required dependency beyond Pydantic. The matrix is
frozen; ExposureMatrixBuilder is the only mutable object, with per-axis freeze
and thaw, eager default rows, and a snapshotting build(). Reads distinguish
"unknown key" (KeyError) from "no exposure" (the matrix's cell_fill).
numpy sits behind an np facade on both types and is an optional dependency,
installed with the new numpy extra.
Changed (breaking): FrameData conversions moved behind per-library facades¶
lythonic.frame.FrameData now groups conversions by library rather than by
direction. Each library gets one attribute named for its conventional import
alias; class access gives the inbound constructor, instance access the outbound
conversion. This matches ExposureMatrix.np, so one spelling covers both types.
The six methods shipped in v0.0.22 are removed with no deprecation shim. The migration is mechanical:
| Removed | Replacement |
|---|---|
FrameData.from_pandas(df) |
FrameData.pd.from_frame(df) |
fd.to_pandas() |
fd.pd.frame() |
FrameData.from_polars(df) |
FrameData.pl.from_frame(df) |
fd.to_polars() |
fd.pl.frame() |
FrameData.from_arrow(t) |
FrameData.pa.from_table(t) |
fd.to_arrow() |
fd.pa.table() |
Conversion behavior, the columns plus data wire format, and JSON
serialization are unchanged.
New: lythonic.facade¶
LibAccess, the descriptor that binds a class-access facade and an
instance-access facade to one attribute, has a shared home used by both
lythonic.frame and lythonic.exposure. Its require() raises an
ImportError naming the extra that installs the missing package; the numpy
facades in lythonic.exposure now report missing numpy the same way.
Documentation¶
- Reference pages for
lythonic.universe,lythonic.exposure,lythonic.frame, andlythonic.facade. CONTEXT.mdglossary for exposure-matrix and facade terminology, with ADRs underdocs/adr/for the immutable-matrix-with-builder split and the index-triple record layout.- Agent skill conventions under
docs/agents/: issue tracker workflow, triage labels, and domain-doc layout.
Internal¶
- The per-extra CI job gained
numpyand now runs the tests belonging to whichever extra it installed.
Decisions and tickets¶
New ADRs:
- 0001 Exposure matrices are immutable; all growth happens in a
builder — the matrix has no
setters at all;
ExposureMatrixBuilderis the only mutable object. - 0002 Exposure records serialize as index
triples — records persist
as
(subject index, target index, value); indexes never reach the interface.
Closed tickets: