For a reviewer:
- Decision: correctness is gated in CI, not reviewed by eye; drift gates, ONNX parity, and the additive-identity invariant are merge blockers.
- Trade-off: more gates mean slower merges, traded for never shipping a silent data or model regression.
- Proof: CI/CD with deploy / promote / rollback, post-publish verify with auto-rollback, and Terraform-codified infrastructure.
Prerequisites
- Python 3.11+
- Node.js v18+ and pnpm for the React app or docs site
- Git
- Make standard on macOS/Linux
Setup
Run the pipeline locally
Choose a data scope based on what you’re working on:assert_lap_7term_identity inside make dbt-test.
Testing
Code style
Python
Python
- Type hints on all public functions.
- Use
logging, notprint()sensitive data is masked automatically iningestion/src/environment.py. - No hardcoded secrets environment variables only.
dbt / SQL
dbt / SQL
- Every model needs a description and column docs in its
schema.yml. - Every new model needs at least one dbt test.
- Match the header-comment style in
int_lap_fuel_state.sql: layer, grain, the identity/contract it satisfies.
Adding work by layer
Add a dbt model
- Write the SQL in
transform/models/. - Add a description + column docs to
schema.yml. - Add at least one dbt test.
- Run
make dbt-devandmake dbt-test. - If the model participates in the seven-term identity, confirm
assert_lap_7term_identitystill passes.
Add or change an app feature
Every shipped feature ships its docs in the same PR as its code.
- Write or update
docs/app/<dir>.mdxfromdocs/snippets/app-page-template.mdx. - Add the slug to the
docs.jsonApp group. - Set
methodologyHrefto`${CANONICAL_DOCS_BASE}/app/<dir>`import fromapp/src/config.ts, never hard-code the host. - Run
make docs-app-auditandmake docs-factsuntil both are green.
Ingestion changes
See
ingestion/README.md for module architecture and data-quality checks. Key principles: graceful degradation, idempotent writes, schema validation before write, exponential backoff.ML / reference docs
- ML: see
ml/README.md; runmake ml-test. - Reference docs are auto-generated edit the source (
schema.yml, docstrings,ml/model_card.yml), then runmake ml-referenceor the relevant generator inscripts/. CI fails if the committed reference drifts from a fresh generation.
Pull request process
- Test locally run the relevant suite(s) before pushing.
- Keep PRs focused one change per PR.
- Write a descriptive title e.g. “Add dry-run flag to ingest CLI”, not “Fix stuff”.
- Include context what problem it solves, what you tested, known limitations.
- Expect iteration reviews may request changes; respond and re-push.
Getting help
Usage questions
The relevant layer README e.g.
ingestion/README.md, transform/README.md.Architecture & rationale
The Architecture Decisions log and the seven-term identity explanation.
Bugs & features
Open an issue or discussion on GitHub.