-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (45 loc) · 925 Bytes
/
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
ifndef CI
ifndef VIRTUAL_ENV
$(error Please use virtualenv)
endif
endif
PACKAGE_NAME := "tribesat_backend"
all: requirements
python setup.py install
develop: requirements
python setup.py develop
.PHONY: requirements
requirements:
pip install -r requirements.txt
test: requirements
make lint && make unit-test && make type-check && make style-review
lint:
pylint $(PACKAGE_NAME)
unit-test:
nosetests \
--verbose \
--nocapture \
--with-coverage \
--cover-tests \
--cover-erase \
--cover-package=$(PACKAGE_NAME) \
tests
type-check:
mypy $(PACKAGE_NAME) \
--ignore-missing-imports
setup-db:
./scripts/build.sh
pretty:
yapf \
--in-place \
--recursive \
--parallel \
$(PACKAGE_NAME) tests
style-review:
@output="$$(yapf --parallel --diff --recursive nodelib tests)"; \
if [ -n "$$output" ]; then \
echo "$$output"; \
echo "run 'make pretty'"; \
exit 1; \
fi
@echo "Looks good"