ump_intake.panel
module ump-intake
Panel build (stage 3): apply the confirmed mapping, aggregate columns that map to the same media id, tie the extracted totals to the printed ones (G-DATA-02), and render the canonical weekly CSV.
Extraction rating (governance framework): exact for machine-readable sources (CSV, inline data, generated
demo data, connector rows), parsed for a scripted read of a formatted workbook, read for OCR or AI and
retyped for hand typing (both declared by the caller). G-DATA-03 widens read or retyped values that were
not double-keyed.
Functions
Section titled “Functions”default_rating
Section titled “default_rating”function
def default_rating(kind: str) -> strSource: packages/ump-intake/src/ump_intake/panel.py, line 26
build_panel
Section titled “build_panel”function
def build_panel( t: ParsedTable, mapping: dict[str, str], printed_override: dict[str, float] | None = None, *, tolerance_rel: float = TOTALS_TOLERANCE_REL,) -> dict[str, Any]Apply {column: target}. Returns the canonical table, tie-out, aggregation notes and fit hints.
Source: packages/ump-intake/src/ump_intake/panel.py, line 30
tie_out
Section titled “tie_out”function
def tie_out( t: ParsedTable, targets: dict[str, str], rows: list[dict[str, Any]], kpi_id: str, media_cols: dict[str, list[str]], printed_override: dict[str, float] | None, *, tolerance_rel: float = TOTALS_TOLERANCE_REL,) -> dict[str, Any]G-DATA-02: extracted totals against printed totals, per source column. The headline pair is the column with the largest relative gap, so the gate reflects the worst column.
Source: packages/ump-intake/src/ump_intake/panel.py, line 105
panel_rows
Section titled “panel_rows”function
def panel_rows(canonical: bytes) -> tuple[list[str], list[list[Any]]]Read a canonical panel CSV back to (columns, rows) with numbers as floats and dates as ISO text.
Source: packages/ump-intake/src/ump_intake/panel.py, line 136
Constants
Section titled “Constants”| Name | Type | Value | Description |
|---|---|---|---|
EXTRACTION_RATINGS | ('exact', 'parsed', 'read', 'retyped') | ||
TOTALS_TOLERANCE_REL | 0.01 | §15 G-DATA-02 tie-out tolerance (relative), proposed. Callers may pass their own tolerance_rel. |