--- title: Reno Scheduling Engine emoji: 🏗️ colorFrom: blue colorTo: indigo sdk: docker app_port: 7860 pinned: false --- # Reno Scheduling Engine — Phase 2 (calendar-aware Day-0 scheduler) A production-style DAG scheduler for a renovation/construction platform, built in Python (FastAPI + SQLite + Streamlit). It turns BOQ items into activities via configurable templates, builds a cycle-checked dependency DAG, and runs a CPM forward pass against real working-time calendars (weekends, holidays, reduced-permit windows, per-contractor calendars) plus PM pins — producing an immutable, versioned **Day-0 baseline** schedule with a Gantt view. ## What's inside - **Rules Engine** — BOQ item → activities + intra-item dependencies (template-driven). - **DAG Service** — Kahn cycle check, topological sort, descendants. - **Calendar Service** — timezone-correct working-time math (DST-safe via `zoneinfo`). - **Scheduling Engine** — CPM forward pass → versioned `schedule_versions`. - **Streamlit tester** — create projects/BOQ/dependencies, compute a baseline, and a **Day-0 Explainability** tab that derives every date step-by-step with a critical-path Gantt + DAG. ## Run locally ```bash pip install -r requirements.txt python -m scripts.migrate up python -m scripts.seed python -m uvicorn app.api.app:app --port 8000 # API streamlit run streamlit_app.py # UI on http://localhost:8501 python -m pytest # 53 tests ``` On the Space, `start.sh` runs migrations + seed, starts the API internally, and serves the Streamlit UI on port 7860. See `docs/` for the architecture, data inventory, and phase notes.