Epic: #31 · Depends on: #32
Background
Phase 1 added to_prediction_frame() for pgm data (views_postprocessing/unfao/frames.py, SpatialLevel.PGM, unit = priogrid_gid). Reconciliation also needs the cm side (SpatialLevel.CM, unit = country_id) and must return a reconciled pgm frame without mutating its input (de-mutation; views-reporting register C-184).
Work
- Extend the frame adapters so cm prediction data →
PredictionFrame at SpatialLevel.CM (unit = country_id), reusing the existing pgm path.
- Keep the boundary thin (pandas→numpy only where the input is still a DataFrame); one concept per file.
Acceptance criteria
Validation
- Unit tests alongside
tests/test_views_frames_conformance.py.
Notes
- Reuse
views_postprocessing/unfao/frames.py:to_prediction_frame; the cm variant differs only in level/unit.
Epic: #31 · Depends on: #32
Background
Phase 1 added
to_prediction_frame()for pgm data (views_postprocessing/unfao/frames.py,SpatialLevel.PGM, unit =priogrid_gid). Reconciliation also needs the cm side (SpatialLevel.CM, unit =country_id) and must return a reconciled pgm frame without mutating its input (de-mutation; views-reporting register C-184).Work
PredictionFrameatSpatialLevel.CM(unit =country_id), reusing the existing pgm path.Acceptance criteria
PredictionFrames build from the S0 fixture's inputs.views_frames.conformance.assert_frame_contractpasses for both.(month_id, country_id)and(month_id, priogrid_gid).Validation
tests/test_views_frames_conformance.py.Notes
views_postprocessing/unfao/frames.py:to_prediction_frame; the cm variant differs only in level/unit.