forked from OpenUnited/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (52 loc) · 2.25 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
MANAGE = python manage.py
help:
@echo "help -- Print this help showing all commands. "
@echo "run -- run the django development server "
@echo "test -- run all tests "
@echo "cov -- run all tests with coverage "
@echo "cov_html -- run all tests with html coverage "
@echo "migrate -- prepare migrations and migrate "
@echo "admin -- Created superuser and it prompt for password "
@echo "seed -- Seed or load data from each app "
@echo "setup -- load all the data from the fixture to the app "
@echo "dumpdata -- Backup the data from the running django app "
@echo "tailwindcss -- Generate Tailwindcss "
rmpyc:
find . | grep -E "__pycache__|\.pyc|\.pyo" | xargs sudo rm -rf
run:
$(MANAGE) runserver
migrate:
$(MANAGE) makemigrations
$(MANAGE) migrate
seed:
${MANAGE} loaddata canopy commerce engagement product_management security talent
setup:
python reset_database.py
make migrate
${MANAGE} loaddata canopy commerce engagement product_management security talent
make test
dumpdata:
${MANAGE} dumpdata canopy --output canopy/fixtures/canopy.json
${MANAGE} dumpdata commerce --output commerce/fixtures/commerce.json
${MANAGE} dumpdata engagement --output engagement/fixtures/engagement.json
${MANAGE} dumpdata product_management --output product_management/fixtures/product_management.json
${MANAGE} dumpdata security --output security/fixtures/security.json
${MANAGE} dumpdata talent --output talent/fixtures/talent.json
make format_fixtures
admin:
$(MANAGE) createsuperuser --username=admin [email protected]
test:
pytest .
tailwindcss:
tailwindcss -o ./static/styles/tailwind.css --minify
format_fixtures:
jsonformat canopy/fixtures/canopy.json
jsonformat commerce/fixtures/commerce.json
jsonformat engagement/fixtures/engagement.json
jsonformat product_management/fixtures/product_management.json
jsonformat security/fixtures/security.json
jsonformat talent/fixtures/talent.json
cov:
pytest --cov
cov_html:
pytest --cov --cov-report html --cov-fail-under=50