-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (39 loc) · 1.28 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
FLAKE8_MAX_COMPLEXITY=10
FLAKE8_IGNORE=E128,E131
FLAKE8_OPTS=--exclude=.git,migrations --max-complexity=$(FLAKE8_MAX_COMPLEXITY) --ignore=$(FLAKE8_IGNORE)
.PHONY: test coverage
help:
@echo "Available commands:"
@echo " test - run the tests"
@echo " coverage - run the test and compute code coverage"
@echo " lint - run the source code / style checker"
@echo " update - update database and static assets"
@echo " prod-depends - install production dependencies"
@echo " dev-depends - install development dependencies"
@echo " test-depend - install test dependencies"
@echo " dev-update - update dev deps, database and static assets"
@echo " clean - remove .pyc files"
all:
test
clean:
find . -name '*.pyc' -delete
test: clean
python manage.py test --settings=project.settings.test
coverage: clean
coverage run --source=. manage.py test --settings=project.settings.test
coverage html
coverage report
@echo "HTML report available in 'htmlcov/' directory."
lint:
flake8 $(FLAKE8_OPTS) .
dev-depends:
pip install -r requirements/dev.txt
test-depends:
pip install -r requirements/test.txt
prod-depends:
pip install -r requirements/prod.txt
dev-update: dev-depends
$(MAKE) update
update: clean
python manage.py migrate
python manage.py collectstatic --noinput