PYTHON ?= python3
OUT ?= experiment_output
RUNS ?= 1000
BOOTSTRAP ?= 2000
SEED ?= 20260810
PAPER := available_to_sell_reservations

.PHONY: identity test reported-results verify smoke reproduce paper clean

identity:
	$(PYTHON) verify_artifact_identity.py

test:
	$(PYTHON) -m unittest discover -s tests -v

reported-results:
	$(PYTHON) verify_reported_results.py

verify: identity test reported-results
	sha256sum -c SHA256SUMS

smoke: test
	rm -rf $(OUT)/smoke
	$(PYTHON) inventory_experiment.py --runs 2 --bootstrap 20 --seed $(SEED) --out-dir $(OUT)/smoke

reproduce: test
	rm -rf $(OUT)/full
	$(PYTHON) inventory_experiment.py --runs $(RUNS) --bootstrap $(BOOTSTRAP) --seed $(SEED) --out-dir $(OUT)/full

paper:
	cd paper && pdflatex -interaction=nonstopmode -halt-on-error $(PAPER).tex
	cd paper && pdflatex -interaction=nonstopmode -halt-on-error $(PAPER).tex
	cd paper && pdflatex -interaction=nonstopmode -halt-on-error $(PAPER).tex

clean:
	rm -rf $(OUT) __pycache__ tests/__pycache__
	rm -f paper/*.aux paper/*.log paper/*.out paper/*.toc paper/*.synctex.gz
