-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Makefile
83 lines (72 loc) · 2.52 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
#/usr/bin/sh
# Build Mishkal Package
default: all
# Clean build files
clean:
backup:
#create all files
all:
# Publish to github
publish:
git push origin master
date=$(shell date +'%y.%m.%d-%H:%M')
doc:
epydoc -v --config epydoc.conf
# run
server:
python3 interfaces/web/mishkal_bottle.py
flask:
python3 interfaces/web/mishkal_flask.py
gui:
python3 interfaces/gui/mishkal-gui.py
console:
python3 bin/mishkal-console.py
#build
md2rst:
pandoc -s -r markdown -w rst README.md -o README.rst
md2html:
pandoc -s -r markdown -w html README.md -o README.html
wheel:
sudo python3 setup.py bdist_wheel
sdist:
sudo python3 setup.py sdist
upload:
echo "use twine upload dist/mishkal-0.1.tar.gz"
install:
sudo python3 setup.py install
# tests
test2l:limit=-l 2
test2 test2l:
# test on python 2
python2 bin/mishkal-console.py --progress ${limit} --eval -f tests/samples/phrases.txt >tests/output/test2.csv
test3l:limit=-l 2
test3 test3l:
python3 bin/mishkal-console.py --progress ${limit} --eval -f tests/samples/phrases.txt >tests/output/test3.csv
profile:
python3 -m cProfile -o tests/output/phrases.profile bin/mishkal-console.py --progress --eval -f tests/samples/phrases.txt >tests/output/test3.csv
# eval
#~FILE="adab.txt"
#FILE="rndlines.txt"
jazeera:FILE="aljazeera.txt"
jazeera:limit=500
#~ jazeera:profiler=-m cProfile -o output/mishkal.profile
jazeera:profiler=-m cProfile
jazeera:
#~ cd tests;python3 ${profiler} ../bin/mishkal-console.py --cache --progress --eval -l ${limit} -f samples/vocalized/${FILE} >output/compare/rndlines.11.txt
cd tests;python3 ${profiler} ../bin/mishkal-console.py --progress --eval -l ${limit} -f samples/vocalized/${FILE} >output/compare/rndlines.11.txt
echo "make archive"
cd tests;cp output/compare/rndlines.11.txt output/compare/L${date}.txt
echo "save stats"
cd tests;date >> output/compare/file.stats
#~ cd tests;grep "function calls" -2 -h output/compare/rndlines.11.txt | sed 's/^.*function .* in //g;s/:\*.*$//g' | sed 'N;s/\n//g' >> output/compare/file.stats
cd tests;grep "function calls" -h output/compare/rndlines.11.txt > /tmp/lines.tmp
#~ sed "s/^.*function .* in //g;s/:\*.*$$//g" -i /tmp/lines.tmp
#~ sed "N;s/\n//g" -i /tmp/lines.tmp
cd tests;cat /tmp/lines.tmp>> output/compare/file.stats
cd tests;tail -n 3 output/compare/file.stats
compare:FILE=phrases.txt
compare:limit=10
compare:
cd tests;python3 ../bin/mishkal-console.py --progress --eval -l ${limit} -f samples/${FILE} --compareto samples/${FILE} >output/compare/compare.txt
exe-gui:
pyinstaller mishkal-gui.spec