- Add client_load_mw to CommercialConfig (defaults to ppa_capacity_mw) - Add hourly_timestamps, hourly_fy, hourly_proj_year, hourly_total_re, hourly_client_end, hourly_load to ScenarioResult - Generate 25-year hourly data in runner.py with proper timestamps - Update API worker to return new hourly fields - Update WorkbookView HourlyGenerationSheet to show all 5 columns at each expandable level (Year > Month > Day > Hour) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src/remodel_api | ||
| tests | ||
| Dockerfile | ||
| 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