-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (70 loc) · 1.56 KB
/
Makefile
File metadata and controls
91 lines (70 loc) · 1.56 KB
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
ifeq (, $(ENV))
env := development
else ifeq (test, $(ENV))
env := testing
else
env := $(ENV)
endif
app := schwyz
# -- installation
setup:
pip install -e '.[${env}]' -c constraints.txt
.PHONY: setup
# -- database
db-init:
${app}_manage 'config/${env}.ini#${app}' db init
.PHONY: db-init
ds-seed:
${app}_manage 'config/${env}.ini#${app}' ds seed
.PHONY: ds-seed
# -- application
serve:
./bin/serve --env ${env} --config config/${env}.ini --reload
.PHONY: serve
# -- testing
test:
ENV=test py.test -c 'config/testing.ini' -q
.PHONY: test
test-cov:
ENV=test py.test -c 'config/testing.ini' -q --cov=${app} \
--cov-report term-missing:skip-covered
.PHONY: test-cov
cov: | test-cov
.PHONY: cov
test-coverage:
ENV=test py.test -c 'config/testing.ini' -q --cov=${app} \
--cov-report term-missing \
--cov-report html:tmp/coverage
.PHONY: test-coverage
coverage: | test-coverage
.PHONY: coverage
# -- utility
check:
flake8
.PHONY: check
lint:
pylint test ${app}
.PHONY: lint
vet: | check lint
.PHONY: vet
build:
ifeq (, $(shell which gulp 2>/dev/null))
$(info gulp command not found. run `npm install -g gulp-cli`)
$(info )
else
NODE_ENV=$(NODE_ENV) gulp
endif
.PHONY: build
clean:
find . ! -readable -prune -o \
! -path "./.git/*" ! -path "./node_modules/*" ! -path "./venv*" \
! -path "./doc/*" ! -path "./locale/*" ! -path "./tmp/*" \
! -path "./lib/*" -print | \
grep -E "(__pycache__|\.egg-info|\.pyc|\.pyo)" | \
xargs rm -rf
ifneq (, $(shell which gulp 2>/dev/null))
gulp clean
endif
.PHONY: clean
.DEFAULT_GOAL = coverage
default: coverage