# WP37 — reproducible pipeline (run from the project root; requires the authorised snapshot in data/raw/) PY := .venv/bin/python .PHONY: all env ingest panel match validate phase1 phase4 phase5 robust tables figures paper test clean all: ingest panel match validate phase4 phase5 robust tables figures paper env: uv venv --python 3.12 .venv && uv pip install --python $(PY) -e . ingest: $(PY) -m src.ingestion.load_snapshot && $(PY) -m src.ingestion.statcan panel: $(PY) -m src.cleaning.retailers && $(PY) -m src.cleaning.build_panel match: $(PY) -m src.matching.calibrate_thresholds && $(PY) -m src.matching.match_products && $(PY) -m src.matching.recall_gtin validate: # LLM second annotation requires ANTHROPIC_API_KEY in .env; operator labels are kept in the CSV $(PY) -m src.matching.validation_report && $(PY) -m src.cleaning.coverage && $(PY) -m src.reports.phase1_audit phase4: $(PY) -m src.econometrics.build_matched_panel && $(PY) -m src.econometrics.model_a_dispersion && $(PY) -m src.econometrics.model_b_promotions \ && $(PY) -m src.econometrics.model_c_spillovers && $(PY) -m src.indices.price_indices && $(PY) -m src.indices.basket_optimization && $(PY) -m src.forecasting.rolling_forecast phase5: $(PY) -m src.indices.qgpai robust: $(PY) -m src.econometrics.robustness tables figures: $(PY) -m src.reports.make_tables && $(PY) -m src.reports.make_figures paper: cd paper && latexmk -pdf -interaction=nonstopmode main.tex test: $(PY) -m pytest -q clean: cd paper && latexmk -C