-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 1.57 KB
/
Copy pathMakefile
File metadata and controls
47 lines (35 loc) · 1.57 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
PYTHON ?= python3
PYTHONPATH := .
.PHONY: all install test reproduce figures paper clean help
help:
@echo "Targets:"
@echo " install -- pip install -e ."
@echo " test -- run unit tests (~1.5s)"
@echo " reproduce -- run all 3 experiments (~30s on CPU)"
@echo " figures -- regenerate paper/figures/*.{png,pdf}"
@echo " paper -- build paper/pyropredict.pdf"
@echo " all -- reproduce + figures + paper"
@echo " clean -- delete build artefacts"
install:
pip install -e .
test:
PYTHONPATH=$(PYTHONPATH) $(PYTHON) -m pytest -q tests/
reproduce: results/spread_accuracy.json results/evacuation.json results/resources.json
results/spread_accuracy.json: experiments/spread_accuracy.py pyropredict/*.py
PYTHONPATH=$(PYTHONPATH) $(PYTHON) experiments/spread_accuracy.py
results/evacuation.json: experiments/evacuation.py pyropredict/*.py
PYTHONPATH=$(PYTHONPATH) $(PYTHON) experiments/evacuation.py
results/resources.json: experiments/resources.py pyropredict/*.py
PYTHONPATH=$(PYTHONPATH) $(PYTHON) experiments/resources.py
figures: reproduce
PYTHONPATH=$(PYTHONPATH) $(PYTHON) scripts/make_figures.py
paper: figures
cd paper && pdflatex -interaction=nonstopmode pyropredict.tex \
&& bibtex pyropredict \
&& pdflatex -interaction=nonstopmode pyropredict.tex \
&& pdflatex -interaction=nonstopmode pyropredict.tex
all: paper
clean:
rm -f paper/*.aux paper/*.log paper/*.bbl paper/*.blg paper/*.out paper/*.toc
find . -type d -name '__pycache__' -prune -exec rm -rf {} +
find . -type d -name '.pytest_cache' -prune -exec rm -rf {} +