.PHONY: acquire-data verify-data process split evidence-test result-integrity-test verify-packaged-evidence report-evidence reproduce-smoke reproduce-evidence

SCIENTIFIC_TESTS = \
	tests/test_conformal.py \
	tests/test_data.py \
	tests/test_external.py \
	tests/test_external_benchmark.py \
	tests/test_phase2.py \
	tests/test_ranking.py \
	tests/test_split_and_models.py \
	tests/test_statistics.py

acquire-data:
	conformalfl acquire
	conformalfl acquire-external-benchmark --config configs/phase2/external_benchmark.yaml

verify-data:
	conformalfl verify-data

process:
	conformalfl process

split:
	conformalfl split

evidence-test:
	pytest $(SCIENTIFIC_TESTS) -k 'not frozen_core_hash_preservation and not publication_result_hash_preservation'

result-integrity-test:
	pytest \
		tests/test_phase2.py::test_frozen_core_hash_preservation \
		tests/test_phase2.py::test_publication_result_hash_preservation

verify-packaged-evidence:
	conformalfl verify-claims
	conformalfl verify-claims --phase2

report-evidence:
	conformalfl report
	conformalfl report --phase2
	conformalfl verify-claims --phase2

reproduce-smoke: evidence-test verify-packaged-evidence

reproduce-evidence:
	$(MAKE) verify-data
	$(MAKE) process
	$(MAKE) split
	conformalfl experiment-core
	conformalfl experiment-secondary
	conformalfl statistics
	conformalfl verify-frozen-core
	$(MAKE) evidence-test
	conformalfl phase2-repeated --config configs/phase2/repeated.yaml
	conformalfl phase2-operational-target --config configs/phase2/operational_target.yaml
	conformalfl phase2-temporal --config configs/phase2/temporal.yaml
	conformalfl phase2-external-benchmark --config configs/phase2/external_benchmark.yaml
	conformalfl phase2-rankings --config configs/phase2/rankings.yaml
	conformalfl phase2-calibration --config configs/phase2/calibration.yaml
	conformalfl phase2-ties --config configs/phase2/ties.yaml
	conformalfl phase2-fewshot --config configs/phase2/fewshot.yaml
	conformalfl phase2-features --config configs/phase2/features.yaml
	conformalfl phase2-model --config configs/phase2/external_model.yaml
	conformalfl phase2-error-analysis
	conformalfl phase2-reviewer-revision --config configs/phase2/reviewer_revision.yaml
	$(MAKE) report-evidence
	$(MAKE) result-integrity-test
