Python core¶
core/chart/ is the only CHART core.
core/
chart/
api/ # FastAPI application and OpenAPI export
auth/ # Keycloak token and access checks
setup/ users/ # Application setup and user management
workspaces/ # Geography-scoped planning workspaces
geographies/ # User places and analytical area mapping
climate/ # Source-neutral monthly data and requests
model_registry/ # Versioned model files and place mapping
inference/ # Deterministic scorer and optional explanation
actions/ # Action repository: public feed reader and publisher
shared/db/ # SQLAlchemy models; Alembic owns the schema
vra/ # Future module placeholder only
alembic/
tests/
orchestration/
src/chart_pipeline/ # Dagster assets — imports chart.*, not FastAPI
Dagster imports these services through thin wrappers. Analytical code does not import FastAPI or Dagster.
Database and API¶
| Face | Entry | Port (local) |
|---|---|---|
| Climate predict API | make climate-api |
3210 |
| Dagster | make dev |
3002 |
| Model registry runtime (R) | pipelines/models/inference |
8000 |
Climate predict reads district_climate from Postgres when DATABASE_URL is set,
then optionally calls the LBW Plumber service for outcome.type=lbw.
Database¶
Postgres holds the climate spine (district_climate, data_source, …). Migrations
and application tables. Alembic in core/ is the sole schema owner.
OpenAPI¶
Python services export machine-readable contracts:
Human-readable notes: Climate API. Interactive contracts: API explorer.
Place and model handoff: Add a geography and model.