ingest
Convert patch summaries into normalized index records.
This module is backend-independent: it turns PatchSummary objects into plain records (dicts/dataclasses) using only the four primitive storage types. Coordinate envelopes are stored in each coordinate’s ORIGINAL units beside the original unit string — never converted — so the index shows what the patch shows and a bare numeric query means native units. Unit-bearing attr values are still normalized to pint base SI (one canonical unit per attr column); unit-bearing queries convert themselves per stored coordinate unit at query time.
Functions
| Name | Description |
|---|---|
| assemble_source_records | Assemble source records from already-fetched index frames. |
| attr_column_name | Return the attrs-table column for an attr name and kind. |
| dump_path_attrs | Serialize a path-attrs dict for the sources table (None when empty). |
| hive_path_attrs | Return the indexable hive-style path attrs for a stored relative path. |
| hive_typed_attrs | Wrap hive path attrs as string TypedValues (no type inference). |
| patch_record | Convert one PatchSummary into a PatchRecord. |
| sanitize_attr_name | Return a lowercase [a-z0-9_] identifier for an attr name. |
| summaries_to_records | Group patch summaries by source and convert to SourceRecords. |
| typed_value | Classify a python/numpy scalar into a TypedValue, or None to skip. |
Classes
| Name | Description |
|---|---|
| CoordRecord | One patch-coord entry (typed columns split by kind). |
| PatchRecord | One patch: structural fields, typed attrs, coord rows. |
| SourceRecord | One source (scan unit) and the patches it emitted. |
| TypedValue | A value with its index kind and (canonical) units. |