SPB Git

spb/qwhpi Public

QHPI — Quebec Housing Price Index: quality-adjusted, hierarchically pooled housing price indexes.

Python 63.9% TypeScript 25.4% CSS 5.5% TeX 3.5% SQL 0.8% Makefile 0.5% Dockerfile 0.5%
1.9 KB · 64 lines make
Raw Blame History
1# =============================================================================2# QWHPI — Quebec Weekly Housing Price Index3# Author  : Simon-Pierre Boucher4# Contact : contact@spboucher.ai5# File    : Makefile6# Purpose : One-command targets — pipeline, refresh, api, web, docker, tests.7# =============================================================================89PY := python310ENGINE := engine/scripts1112.PHONY: pipeline refresh api web up down test lint headers figures paper clean1314## Full engine run: audit -> geography -> clean -> baseline -> hierarchical15## -> validation -> canonical dataset (+ DB load when DATABASE_URL is set)16pipeline:17	$(PY) $(ENGINE)/01_profile.py18	$(PY) $(ENGINE)/02_geography.py19	$(PY) $(ENGINE)/03_clean.py20	$(PY) $(ENGINE)/04_baseline.py21	$(PY) $(ENGINE)/05_hierarchical.py22	$(PY) $(ENGINE)/06_validation.py23	$(PY) $(ENGINE)/07_canonical.py24	$(PY) $(ENGINE)/09_monthly.py25	$(PY) $(ENGINE)/10_monthly_validation.py26	$(PY) $(ENGINE)/11_monthly_canonical.py27	$(PY) -c "import sys; sys.path.insert(0,'engine/src'); from qwhpi.export import load_database; load_database()"2829## Incremental refresh (new rows appended to the raw CSV) — monthly headline30refresh:31	$(PY) $(ENGINE)/03_clean.py32	$(PY) $(ENGINE)/09_monthly.py33	$(PY) $(ENGINE)/11_monthly_canonical.py34	$(PY) -c "import sys; sys.path.insert(0,'engine/src'); from qwhpi.export import load_database; load_database()"3536api:37	cd api && $(PY) -m uvicorn app.main:app --host 0.0.0.0 --port 80803839web:40	cd web && npm run build && npm run start4142up:43	docker compose up --build -d4445down:46	docker compose down4748test:49	cd api && $(PY) -m pytest tests -q50	cd engine && $(PY) -m pytest tests -q5152headers:53	$(PY) scripts/check_headers.py5455figures:56	$(PY) $(ENGINE)/08_figures.py5758paper:59	cd paper && latexmk -pdf -quiet qwhpi.tex || pdflatex qwhpi.tex6061lint:62	$(PY) scripts/check_headers.py63	cd web && npx tsc --noEmit64