-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
116 lines (97 loc) · 2.86 KB
/
Makefile
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
MAKE_FILE_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
export PYTHONPATH := $(PYTHONPATH):$(MAKE_FILE_DIR)
pre-commit: lint test
@echo "OK"
clean:
rm -f .coverage*
rm -f profile.out
rm -rf __pycache__
rm -rf htmlcov
rm -rf .pytest_cache
rm -rf cascade/__pycache__
rm -rf cascade/.pytest_cache
rm -rf cascade/tests/__pycache__
rm -rf study/__pycache__
rm -rf docs/source/_build
rm -rf docs/source/_modules
rm -rf docs/build/*
data: data-papers data-performance data-zero-handling
data-papers:
mkdir -p study/data/papers
rm -f study/data/papers/data__*
python study/run_experiments.py study/experiments_papers.json \
--output-dir study/data/papers
data-papers-subset:
mkdir -p study/data/papers_subset
rm -f study/data/papers_subset/data__*
python study/run_experiments.py study/experiments_papers.json \
--output-dir study/data/papers_subset --max-runs 3
data-performance:
mkdir -p study/data/performance
rm -f study/data/performance/data__*
python study/run_experiments.py study/experiments_performance.json \
--output-dir study/data/performance
data-zero-handling:
mkdir -p study/data/zero_handling
rm -f study/data/zero_handling/data__*
python study/run_experiments.py study/experiments_zero_handling.json \
--output-dir study/data/zero_handling
coverage-open:
open htmlcov/index.html
docs:
sphinx-build -a docs/source docs/build
docs-open: docs
open docs/build/index.html
graphs-papers:
mkdir -p study/graphs/papers
rm -f study/graphs/papers/*.png
python study/make_graphs.py study/graphs_demystifying.json \
--data-dir study/data/papers
python study/make_graphs.py study/graphs_andre_reis_thesis.json \
--data-dir study/data/papers
graphs-performance:
mkdir -p study/graphs/performance
rm -f study/graphs/performance/*.png
python study/make_graphs.py study/graphs_performance.json \
--data-dir study/data/performance
graphs-zero-handling:
mkdir -p study/graphs/zero_handling
rm -f study/graphs/zero_handling/*.png
python study/make_graphs.py study/graphs_zero_handling.json \
--data-dir study/data/zero_handling
install:
pip install -r requirements.txt
lint:
pylint cascade cascade/tests
pylint study
profile:
mkdir -p study/data/profile
rm -f study/data/performance/data__*
python -m cProfile -o profile.out study/run_experiments.py --disable-multi-processing \
--output-directory study/data/profile study/experiments_profile.json
python -m gprof2dot -f pstats profile.out | dot -Tpng -o profile.png
open profile.png
profile-open:
open profile.png
test:
rm -f .coverage*
pytest -v -s --cov=cascade --cov-report=html --cov-report term cascade/tests
.PHONY: \
clean \
coverage-open \
data \
data-papers \
data-papers-subset \
data-performance \
data-zero-handling \
docs \
docs-open \
graphs-papers \
graphs-performance \
graphs-zero-handling \
install \
lint \
pre-commit \
profile \
profile-open \
test