-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
75 lines (66 loc) · 1.3 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
.DEFAULT_GOAL := test
ifeq ($(CI), true) # Travis CI
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else # UTCS
PYTHON := python3
PIP := pip3
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
endif
format:
$(AUTOPEP8) -i models.py
$(AUTOPEP8) -i idb.py
$(AUTOPEP8) -i config.py
html:
pydoc -w models
mv models.html IDB3.html
log:
git log > IDB3.log
pylint:
$(PYLINT) models.py
coverage:
-rm -r whoosh_index/
$(COVERAGE) run --branch tests.py > tests.out 2>&1
$(COVERAGE) report --include="models.py","config.py" >> tests.out
$(COVERAGE) report --include="models.py","config.py" > coverage.out
cat tests.out
clean:
rm -f *.pyc
rm -f *.html
rm -f *.log
rm -f .coverage
test: format pylint log coverage
echo "success"
versions:
which make
make --version
@echo
which git
git --version
@echo
which $(PYTHON)
$(PYTHON) --version
@echo
which $(PIP)
$(PIP) --version
@echo
which $(PYLINT)
$(PYLINT) --version
@echo
which $(COVERAGE)
$(COVERAGE) --version
@echo
-which $(PYDOC)
-$(PYDOC) --version
@echo
which $(AUTOPEP8)
$(AUTOPEP8) --version
@echo
$(PIP) list