Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Requires **Python 3.11–3.14**.
| Package | Version | Why |
|---------|---------|-----|
| `views-pipeline-core` | `>=3.0.0,<4.0.0` (with the `appwrite` extra) | The framework: lifecycle base classes, data loader, dataset container, Appwrite/datastore tools |
| `views-frames` | `>=1.10.2,<2` | The frame data contract — **the live delivery representation** since #126. pandas survives only in `contract/enrichment.py` (the build/verification path) |
| `views-frames` | `>=1.10.2,<2` | The frame data contract — **the live delivery representation** since #126. There is no pandas in this package at all since #90 |
| `pyarrow` | `>=16.1.0,<17.0.0` | The wire's serialisation. **Pinned deliberately** — the CVE fix past 17 changes delivered bytes (register C-72) |
| *dev group* | `pytest`, `ruff` | Not installed by `pip install views-postprocessing`; `poetry install` includes them |

Expand Down Expand Up @@ -142,7 +142,6 @@ views-postprocessing/
│ ├── historical.py # the historical artifact, built pandas-free
│ ├── gaul_lookup.py # the GAUL asset: path, version, one read
│ ├── gaul_schema.py # the 9-column contract, declared as data
│ ├── enrichment.py # GaulLookupEnricher (build/verification path)
│ ├── source_metadata.py # producer (datafactory) facts
│ ├── store_metadata.py # prediction-store facts
│ └── launch_config.py # the delivery mode the launcher must declare
Expand Down Expand Up @@ -220,7 +219,7 @@ only `.py`; it now scans markdown too.)*
|-----|----------------|
| [`docs/architecture/role_and_seams.md`](docs/architecture/role_and_seams.md) | **Start here** — role vs the sibling repos + internal seams |
| [`docs/ADRs/`](docs/ADRs/) | Architecture decisions (esp. ADR-011 mapper→lookup; ADR-012 ontology) |
| [`docs/CICs/`](docs/CICs/) | Class intent contracts (`UNFAOPostProcessorManager`, `GaulLookupEnricher`) |
| [`docs/CICs/`](docs/CICs/) | Class intent contracts (`UNFAOPostProcessorManager`) |
| `reports/technical_risk_register.md` | Tracked risks — C-40 (the remaining pipeline-core inheritance), C-30/C-15 (delivery guards), C-43 (enrichment value verification) |

---
Expand Down
6 changes: 3 additions & 3 deletions docs/ADRs/012_revised_ontology.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ a **runtime spatial-mapping engine** and **bundled shapefiles** as the authorita
stable core. That architecture no longer exists:

- [ADR-011](011_replace_runtime_mapper_with_precomputed_lookup.md) replaced the runtime
geopandas mapper with a **precomputed GAUL lookup table** (`GaulLookupEnricher`).
geopandas mapper with a **precomputed GAUL lookup table**.
- The mapper, shapefiles, and caching machinery were deleted (C-39 / PR #42).
- Input-integrity invariants and structured delivery were added (epic #51).

Expand Down Expand Up @@ -60,7 +60,7 @@ described the cut-a-repo case; it now says which is which.
| **Delivery Invariants** | Representation-free rules over primitives that a delivery must satisfy: coverage, no-collapse, gid parity, observed-range, provenance. Live in `delivery/` — **nothing there imports pandas or views_frames**. *Forecast identity was one of these until 2026-07-31 — see the amendment below.* | Authoritative — they define what a valid delivery is | Stable — changes are governance decisions |
| **Representation Seam** | `contract/frame_extraction.py` — turns a `views_frames` frame into the primitives the invariants consume. **One seam.** Its pandas sibling `unfao/extraction.py` was deleted in #151 once the pandas delivery was retired; the two ran as deliberate WET siblings through the migration. | Derived — isolates the representation so invariants stay representation-free | Evolving |
| **Wire Mechanism** | `contract/wire/` — the ADR-013 contract: header, shard, sidecar, run manifest, sink, source selection. Partner-neutral: it takes its consumer name and collapse floor as **arguments** (#153). | Authoritative — the contract with the consumer | Stable — changes are contract amendments |
| **Enrichment Asset** | The precomputed GAUL lookup (`data/gaul_lookup.parquet`), its identity in `contract/gaul_lookup.py`, its schema in `contract/gaul_schema.py`, and the keyed gather that joins it (`contract/enrichment.py`, the build/verification path — numpy/pyarrow since #89; see register **C-75** on whether that class should survive at all). | Authoritative for geographic metadata | Stable — rebuilt only when the producer releases new GAUL data |
| **Enrichment Asset** | The precomputed GAUL lookup (`data/gaul_lookup.parquet`), its identity in `contract/gaul_lookup.py`, its schema in `contract/gaul_schema.py`, and the keyed gathers that join it `contract/historical.py` for the actuals artifact and `contract/wire/sidecar.py` for the §5 sidecar. *(A second gather lived in `contract/enrichment.py` with no production caller; retired in #90, register **C-75**.)* | Authoritative for geographic metadata | Stable — rebuilt only when the producer releases new GAUL data |
| **Artifact Builders** | `contract/historical.py` — turns a frame plus the lookup into the partner-facing artifact. | Derived | Evolving |
| **External Facts** | Facts read from systems this repo does not own: the producer's (`contract/source_metadata.py` — `last_valid_month_id`, D-07) and the store's (`contract/store_metadata.py`). | Authoritative (the owning system is the source of truth) | Evolving |
| **Launch Declarations** | `contract/launch_config.py` — the delivery mode the launcher must declare. Omitting a key is **refused by name**, never inferred (ADR-003, register C-63). | Authoritative | Stable |
Expand All @@ -73,7 +73,7 @@ described the cut-a-repo case; it now says which is which.
636 lines holding two of everything, and it called `unfao/extraction.py` *"the **single**
pandas-aware module"* when pandas lived in three. Both drifted the same way: the ADR described
the intended end state of a migration that then stopped one step short. Both are now true —
pandas has **zero runtime importers** (#89 made `contract/enrichment.py`'s a type-only import under `if TYPE_CHECKING` — pandas is in that class's interface, not its implementation) — and the load-bearing ones are
pandas is **absent from the package entirely** (#89 reduced the last one to a type-only import; #90 retired the module that held it — register C-75) — and the load-bearing ones are
**mechanically checked** by `tests/test_doc_accuracy.py`, so the next drift fails CI instead of
waiting for an audit.

Expand Down
193 changes: 0 additions & 193 deletions docs/CICs/GaulLookupEnricher.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/CICs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Contracts must be clear enough that:
## Active Contracts

- `UNFAOPostProcessorManager.md` — Pipeline orchestration manager (read → transform → validate → save)
- `GaulLookupEnricher.md` — Precomputed GAUL lookup enrichment (ADR-011; replaced the runtime mapper)

---

Expand Down
5 changes: 2 additions & 3 deletions docs/architecture/role_and_seams.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ historical actuals arrive as a `FeatureFrame` via pipeline-core's `get_feature_f
(#126 — this repo was its first production consumer), the forecast interior is
`PredictionFrame`, and `contract/frames.py` is the **live constructor** every interior frame
is built through — not the unused adapter it was when this was written, and it supports
`S > 1`. pandas survives in exactly one module, `contract/enrichment.py`, on the
`S > 1`. pandas is gone from the package entirely since #90 retired the last module holding it (register C-75); what remains is on the
build/verification path.

What **remains** of **register C-40** is narrower than this paragraph implies: the manager is
Expand Down Expand Up @@ -181,7 +181,6 @@ views_postprocessing/
│ ├── historical.py the historical artifact, built pandas-free
│ ├── gaul_lookup.py the GAUL asset: path, version, one read per delivery
│ ├── gaul_schema.py the 9-column contract, declared as data
│ ├── enrichment.py GaulLookupEnricher (build/verification path; the last pandas)
│ ├── source_metadata.py producer (datafactory) facts, e.g. last_valid_month_id
│ ├── store_metadata.py prediction-store facts
│ └── launch_config.py the delivery mode the launcher must declare
Expand All @@ -204,7 +203,7 @@ views_postprocessing/
## 7. Where to go next

- **What was decided and why** → `docs/ADRs/` (esp. ADR-011 mapper→lookup; ADR-012 ontology).
- **Per-class contracts** → `docs/CICs/` (`UNFAOPostProcessorManager`, `GaulLookupEnricher`).
- **Per-class contracts** → `docs/CICs/` (`UNFAOPostProcessorManager`).
- **Live risks / open constraints** → the technical risk register (C-40 the pandas gate,
C-25/C-30/C-15 the delivery guards).
- **The frame/draws future** → #45 (delivery-side draw carrier) and C-40.
Loading
Loading