forked from openedx/ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (55 loc) · 3.23 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
help:
@echo ' '
@echo 'Makefile for the edX ecommerce project. '
@echo ' '
@echo 'Usage: '
@echo ' make requirements install requirements for local development '
@echo ' make migrate apply migrations '
@echo ' make serve start the dev server at localhost:8002 '
@echo ' make clean delete generated byte code and coverage reports'
@echo ' make test_python run unit tests with migrations disabled '
@echo ' make quality run pep8 and pylint '
@echo ' make validate run unit tests, followed by quality checks '
@echo ' make html_coverage generate and view HTML coverage report '
@echo ' make accept run acceptance tests '
@echo ' make extract_translations extract strings to be translated '
@echo ' make dummy_translations generate dummy translations '
@echo ' make compile_translations generate translation files '
@echo ' make fake_translations install fake translations '
@echo ' make pull_translations pull translations from Transifex '
@echo ' make update_translations install new translations from Transifex '
@echo ' '
requirements:
pip install -qr requirements/local.txt --exists-action w
pip install -qr requirements/test.txt --exists-action w
migrate:
python manage.py migrate
serve:
python manage.py runserver 8002
clean:
find . -name '*.pyc' -delete
coverage erase
test_python: clean
DISABLE_MIGRATIONS=True python manage.py test ecommerce --settings=ecommerce.settings.test --with-coverage \
--cover-package=ecommerce --with-ignore-docstrings
quality:
pep8 --config=.pep8 ecommerce acceptance_tests
pylint --rcfile=pylintrc ecommerce acceptance_tests
validate: test_python quality
html_coverage:
coverage html && open htmlcov/index.html
accept:
nosetests --with-ignore-docstrings -v acceptance_tests
extract_translations:
cd extensions && i18n_tool extract -v
dummy_translations:
cd extensions && i18n_tool dummy -v
compile_translations:
cd extensions && i18n_tool generate -v
fake_translations: extract_translations dummy_translations compile_translations
pull_translations:
cd extensions && tx pull -a
update_translations: pull_translations generate_fake_translations
# Targets in a Makefile which do not produce an output file with the same name as the target name
.PHONY: help requirements migrate serve clean test_python quality validate html_coverage accept \
extract_translations dummy_translations compile_translations fake_translations pull_translations update_translations