Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (37 loc) · 1.42 KB
/
Copy pathMakefile
File metadata and controls
48 lines (37 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
DUMMY_CASE_ID := TEST-DUMMY-20260501-000000
EXAMPLE_CASE_ID := EXAMPLE
.PHONY: install test lint simulate train analyse verify example clean-example
install:
pip install -r requirements.txt
test:
pytest tests/ -v --cov=cascade --cov-report=term-missing
lint:
ruff check cascade/ scripts/ tests/
black --check cascade/ tests/
mypy --strict cascade/
simulate:
python scripts/make_dataset.py
train:
python scripts/train_classifier.py
analyse:
python scripts/make_dummy_case.py $(DUMMY_CASE_ID)
python -m cascade analyse --case $(DUMMY_CASE_ID)
verify:
python -m cascade verify --case $(DUMMY_CASE_ID)
# Generate a clean example case for reviewers — reproducible from fixed seed.
# Output: cases/EXAMPLE/{input/, audit.jsonl, manifest.json, report.pdf, artefacts/}.
example: clean-example
python scripts/make_dummy_case.py $(EXAMPLE_CASE_ID)
python -m cascade analyse --case $(EXAMPLE_CASE_ID) --seed 42
python -m cascade verify --case $(EXAMPLE_CASE_ID)
@echo ""
@echo "Sample case generated: cases/$(EXAMPLE_CASE_ID)/"
@echo " - report.pdf: forensic-grade signed PDF"
@echo " - manifest.json: hash manifest with master hash"
@echo " - audit.jsonl: append-only audit log"
@echo ""
@echo "Tamper test: edit cases/$(EXAMPLE_CASE_ID)/input/media.png then re-run 'make verify-example' to see the mismatch."
clean-example:
rm -rf cases/$(EXAMPLE_CASE_ID)
verify-example:
python -m cascade verify --case $(EXAMPLE_CASE_ID)