-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (48 loc) · 1.79 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
PYTHON:=python3
ZIP:=zip
BOATOCSV:=$(PYTHON) data/boaToCsv.py
GENDUPES:=$(PYTHON) data/gendupes.py
ZIPOPTIONS:=-u -r
ZIPIGNORES:=-x \*/.DS_Store -x \*/.keep -x data/csv/\*.csv
.PHONY: all rqs data get-boa-output gendupes csvs update-figures package
all: data rqs
rqs: clean
$(PYTHON) judgements.py
$(PYTHON) cohens.py
$(PYTHON) rq1.py
$(PYTHON) rq2.py
$(PYTHON) rq3.py
$(PYTHON) rq4.py
$(PYTHON) stats-table.py
$(PYTHON) dupes.py
data: get-boa-output gendupes csvs
get-boa-output:
./getdata.py
gendupes:
$(GENDUPES) data/txt/hashes.txt > data/txt/dupes.txt
csvs: clean-pq
$(BOATOCSV) -t '2,\.i?py(nb)?' data/txt/counts.txt > data/csv/counts.csv
$(BOATOCSV) -t '2,\.i?py(nb)?' data/txt/dupes.txt > data/csv/dupes.csv
$(BOATOCSV) -t '2,\.i?py(nb)?' data/txt/rq1.output.txt > data/csv/rq1.output.csv
$(BOATOCSV) -t '2,\.i?py(nb)?' data/txt/rq2.output.txt > data/csv/rq2.output.csv
$(BOATOCSV) -t '2,\.i?py(nb)?' data/txt/rq4.output.txt > data/csv/rq4.output.csv
update-figures:
cd paper ; git pull ; rm -Rf figures/ tables/ ; cp -R ../figures . ; cp -R ../tables . ; git add figures/ tables/ ; git commit -m 'update figures/tables' ; git push
package:
-$(ZIP) replication-pkg.zip $(ZIPOPTIONS) *.py LICENSE.txt Makefile README.md requirements.txt tables/ figures/ boa/ data/*.py data/judgements.csv data/*.xlsx $(ZIPIGNORES)
-$(ZIP) data.zip $(ZIPOPTIONS) data/txt/ $(ZIPIGNORES)
-$(ZIP) data-cache.zip $(ZIPOPTIONS) data/parquet/ $(ZIPIGNORES)
.PHONY: clean clean-gen clean-pq clean-boa clean-zip clean-all
clean:
rm -Rf __pycache__
rm -f figures/*.pdf
rm -f tables/*.tex
clean-gen:
rm -f data/csv/*.csv
clean-pq:
rm -f data/parquet/*.parquet
clean-boa:
rm -f data/txt/*.txt
clean-zip:
rm -f replication-pkg.zip data.zip data-cache.zip
clean-all: clean clean-gen clean-pq clean-boa clean-zip