Skip to content

feat(frame-extraction): S2 — frame-native seam readers in their own module (#87)#95

Merged
Polichinel merged 1 commit into
developmentfrom
feat/s2-frame-extraction
Jun 28, 2026
Merged

feat(frame-extraction): S2 — frame-native seam readers in their own module (#87)#95
Polichinel merged 1 commit into
developmentfrom
feat/s2-frame-extraction

Conversation

@Polichinel

Copy link
Copy Markdown
Collaborator

Epic: #85 · S2 (#87) · depends on #86

Adds views_postprocessing/unfao/frame_extraction.py — the frame counterpart to the pandas extraction.py seam. cells_of(frame) / months_of(frame) return the same primitives the representation-free delivery/ invariants consume, read from a PredictionFrame's index.

Parity: golden-equivalence — same data as a pandas MultiIndex frame and a PredictionFrame yields identical cells_of/months_of. pandas-free; ruff clean; 132 passed.

Closes #87

…odule (#87)

Epic #85 / S2. Adds views_postprocessing/unfao/frame_extraction.py — the frame
counterpart to extraction.py (the pandas seam). cells_of(frame) / months_of(frame)
return the same primitives (set[int], int64 month array) the representation-free
delivery/ invariants consume, read from a PredictionFrame's index.

Own module (not appended to extraction.py): one representation per file (screaming/
SRP); when the pandas seam is retired it becomes a clean file-delete. Deliberate
SIBLINGS of the pandas readers, no shared Extractor Protocol (D-11 / YAGNI-ISP).

Pure addition — no caller changes; the forecast interior calls these in S3 (#88).
Deferred (no speculative code): the pandas->(N,S) sample unpacker (gated on
rusty_bucket #143's layout), frame-native unmapped_cell_count (metadata lives on
the pandas enriched frame until S4 #89), drop_months_above (historical path, gated
S7 #92).

Tests: golden-equivalence parity — same data as a pandas MultiIndex frame AND a
PredictionFrame yields identical cells_of/months_of. ruff clean; 132 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Polichinel Polichinel merged commit 76b6cec into development Jun 28, 2026
4 checks passed
@Polichinel Polichinel deleted the feat/s2-frame-extraction branch June 28, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant