-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (25 loc) · 1000 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
.PHONY: shell test-create-db test todo qa pylint-report pylint pep8 clean
PROJ=tracked_model
VENV=3.4.2
TEST_DIR=tests/
PYTEST_OPTS=--cov-report term-missing --cov-config $(COV_CFG) --cov
COV_CFG=$(TEST_DIR)cov.ini
PYLINT_OPTS=--rcfile pylint.rc --load-plugins pylint_django
clean:
@find ./ -name __pycache__ | xargs rm -fr; find ./ -name '*pyc' -delete; find ./ -name '*.swp' -delete; rm -fr dist *.egg-info
pep8:
@pep8 --exclude=migrations $(PROJ) $(TEST_DIR)
pylint:
@pylint -r n --disable=fixme $(PYLINT_OPTS) $(PROJ) $(TEST_DIR)
pylint-report:
@pylint --disable=fixme $(PYLINT_OPTS) $(PROJ) $(TEST_DIR)
qa:
@((pep8 --exclude=migrations $(PROJ) $(TEST_DIR) && pylint -r n $(PYLINT_OPTS) $(PROJ) $(TEST_DIR)) && echo 'All good') || echo 'Nope'
todo:
@pylint -r n --disable=all --enable=fixme $(PROJ)
test:
@py.test $(PYTEST_OPTS) $(PROJ) $(TEST_DIR)
test-create-db:
@py.test --create-db $(PYTEST_OPTS) $(PROJ) $(TEST_DIR)
shell:
@. venv/$(VENV)/bin/activate; ipython