-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
48 lines (40 loc) · 1.76 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
all: python R julia performance sticker todo
.PHONY: python R julia performance sticker todo clean
python:
@echo -e "\e[0;35m\033[1mMaking python package...\e[0;30m\033[0m"
@cd python/ && make all
R:
@echo -e "\e[0;35m\033[1mMaking R package...\e[0;30m\033[0m"
@cd R/ && make all
julia:
@echo -e "\e[0;35m\033[1mMaking Julia package...\e[0;30m\033[0m"
@cd julia/ && make all
performance:
@echo -e "\e[0;35m\033[1mMaking performance report...\e[0;30m\033[0m"
@cd performance && mkdir -p results/ plots/
@cd performance && python -m cProfile -o profile.pstats performance_test.py
@cd performance && gprof2dot -f pstats profile.pstats | dot -Tpng -o profile.png
@cd performance && rm -f profile.pstats
@cd performance && Rscript performance_test.R
@cd performance && julia --project="../julia/MotifCluster.jl" --color=yes performance_test.jl
@cd performance && python performance_plot.py
@cd performance && latexmk -pdf -quiet -rc-report- performance.tex
sticker:
@echo -e "\e[0;35m\033[1mMaking sticker...\e[0;30m\033[0m"
@cd sticker && latexmk -pdf -quiet sticker.tex
@cd sticker && convert -density 500 sticker.pdf sticker.png
@cd sticker && hexsticker sticker.png -o hex_sticker.png \
--border-size 120 --border-color "#6a668A" --supersample 2
@cd sticker && convert hex_sticker.png -resize 150 hex_sticker_small.png
@cd sticker && optipng -o3 hex_sticker.png
@cd sticker && optipng -o3 hex_sticker_small.png
todo:
@echo -e "\e[0;35m\033[1mLooking for todo items...\e[0;30m\033[0m"
@! rg -g "!Makefile" TODO
clean:
@echo -e "\e[0;35m\033[1mCleaning up...\e[0;30m\033[0m"
@cd python && make clean
@cd R && make clean
@cd performance && latexmk -c && rm -rf plots/ results/ profile.png
@rm -rf .pytest_cache/
@cd sticker && latexmk -c && rm -f sticker.pdf sticker.png