- Engine: Add ppa_revenue_cr, mcp_revenue_cr, tariff, units to PnLRow - Engine: Split PPA vs MCP revenue in P&L computation - Web: Collapsible rows for PPA/MCP Revenue and Opex - Web: Highlighted rows (Total Revenue, EBITDA, EBIT, PBT, PAT) - Web: Units above Tariff in breakdown, bg-blue-50 highlight - Fix sticky column z-index for horizontal scroll - CLAUDE.md: Add project documentation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src/remodel_api | ||
| tests | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
remodel-api
FastAPI + Arq async service for the REmodel calculation engine.
Setup
poetry install
# Redis must be running (see docker-compose.yml at repo root)
docker compose up -d redis
Common commands
# Start API server
poetry run uvicorn remodel_api.main:app --reload --port 8000
# Start Arq worker
poetry run arq remodel_api.workers.main.WorkerSettings
# Run tests
poetry run pytest
# Lint + typecheck
poetry run ruff check . && poetry run mypy src/
API
| Method | Path | Description |
|---|---|---|
| GET | /healthz | Health check |
| POST | /api/scenarios | Create + enqueue |
| GET | /api/scenarios | List all |
| GET | /api/scenarios/{id} | Get one |
| GET | /api/scenarios/{id}/events | SSE progress stream |
Interactive docs: http://localhost:8000/docs