-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
107 lines (92 loc) · 2.39 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
FILES := \
app/tests.py \
app/models.py \
IDB3.log \
apiary.apib \
.travis.yml \
models.html \
makefile \
.gitignore \
UML.pdf
ifeq ($(shell uname), Darwin) # Apple
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else ifeq ($(CI), true) # Travis CI
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3
AUTOPEP8 := autopep8
else ifeq ($(shell uname -p), unknown) # Docker
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else # UTCS
PYTHON := python3.5
PIP := pip3
PYLINT := pylint3
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
endif
default: scrub html test log check
.pylintrc:
$(PYLINT) --disable=locally-disabled --reports=no --generate-rcfile > $@
html:
$(PYTHON) -m pydoc -w app/models.py
log:
git log > IDB3.log
check:
@not_found=0; \
for i in $(FILES); \
do \
if [ -e $$i ]; \
then \
echo "$$i found"; \
else \
echo "$$i NOT FOUND"; \
not_found=`expr "$$not_found" + "1"`; \
fi \
done; \
if [ $$not_found -ne 0 ]; \
then \
echo "$$not_found failures"; \
exit 1; \
fi; \
echo "success";
clean:
rm -f .coverage
rm -f *.pyc
rm -f RunIDB.tmp
rm -f TestIDB.tmp
rm -rf __pycache__
config:
git config -l
format:
$(AUTOPEP8) -i app/*.py
scrub:
make clean
rm -f models.html
rm -f IDB3.log
status:
make clean
@echo
git branch
git remote -v
git status
test:
$(PYTHON) app/tests.py
run:
$(PYTHON) app/app.py
ssh:
ssh -i "idb_project.pem" [email protected]
pickle:
$(PYTHON) app/data/generate.py