-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
74 lines (58 loc) · 1.59 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
TEST_FILE?=psef_test/
SHELL=/bin/bash
TEST_FLAGS?=
PYTHON?=env/bin/python3.6
export PYTHONPATH=$(CURDIR)
.PHONY: test_setup
test_setup:
mkdir -p /tmp/psef/uploads
mkdir -p /tmp/psef/mirror_uploads
.PHONY: test_quick
test_quick: test_setup
DEBUG=on env/bin/pytest -n auto --cov psef --cov-report term-missing $(TEST_FILE) -vvvvv -x $(TEST_FLAGS)
.PHONY: test
test: test_setup
DEBUG=on env/bin/pytest -n auto --cov psef --cov-report term-missing $(TEST_FILE) -vvvvv $(TEST_FLAGS)
.PHONY: reset_db
reset_db:
DEBUG_ON=True ./.scripts/reset_database.sh
$(MAKE) db_upgrade
$(MAKE) test_data
.PHONY: migrate
migrate:
DEBUG_ON=True $(PYTHON) manage.py db migrate
DEBUG_ON=True $(PYTHON) manage.py db edit
$(MAKE) db_upgrade
.PHONY: db_upgrade
db_upgrade:
DEBUG_ON=True $(PYTHON) manage.py db upgrade
.PHONY: test_data
test_data:
DEBUG_ON=True $(PYTHON) $(CURDIR)/manage.py test_data
.PHONY: start_dev_celery
start_dev_celery:
DEBUG=on env/bin/celery worker --app=runcelery:celery -E -l info
.PHONY: start_dev_server
start_dev_server:
DEBUG=on ./.scripts/start_dev.sh python
.PHONY: start_dev_npm
start_dev_npm: privacy_statement
DEBUG=on ./.scripts/start_dev.sh npm
.PHONY: privacy_statement
privacy_statement: src/components/PrivacyNote.vue
src/components/PrivacyNote.vue:
./.scripts/generate_privacy.py
.PHONY: build_front-end
build_front-end: privacy_statement
npm run build
.PHONY: seed_data
seed_data:
DEBUG_ON=True $(PYTHON) $(CURDIR)/manage.py seed
.PHONY: format
format:
yapf -rip ./psef ./psef_test
.PHONY: shrinkwrap
shrinkwrap:
npm shrinkwrap --dev
lint:
pylint psef --rcfile=setup.cfg