-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (51 loc) · 1.47 KB
/
Makefile
File metadata and controls
67 lines (51 loc) · 1.47 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
DEV_URL := "http://localhost:5000/"
all: help
help:
@echo "Convenience Makefile for the lazy typists."
@echo
@echo "Runtime stuff:"
@echo " run Start the dev server at $(DEV_URL)"
@echo " open Open a browser to $(DEV_URL)"
@echo " go run && open at the same time"
@echo
@echo "Development stuff:"
@echo " rebuild-virtualenv"
@echo " Remove and rebuild the entire virtual Python environment"
@echo " and reinstalls all dependencies."
@echo " setup-deps"
@echo " Install dependencies in the current Python virtualenv."
@echo " clean Throw away Python bytecode files, caches, and other junk"
@echo " check check Python syntax & coding style"
@echo " test run unit tests (verbose)"
@echo " tt run unit tests (compact)"
@echo " t same as tt, but fails fast"
@echo
################
# Runtime stuff
run:
foreman start
open:
open $(DEV_URL)
go:
(sleep 1; make open) &
make run
####################
# Development stuff
setup-deps:
pip install -r requirements.txt
pip install -r dev-requirements.txt
clean:
find . -name '*.pyc' -print0 | xargs -0 rm -r
check:
@make check-syntax || true
@make check-style || true
check-syntax:
@find $(shell ls | egrep -v '(lib|bin|include)') -name '*.py' -print0 | xargs -0 pyflakes
check-style:
@pep8 -r --exclude=lib,bin,include .
test:
@python -m unittest discover -v -s tests
tt:
@python -m unittest discover -s tests
t:
@python -m unittest discover -s tests --failfast