This repository has been archived by the owner on Jun 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
92 lines (70 loc) · 3.4 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.DEFAULT_GOAL := test
NODE_BIN=./node_modules/.bin
.PHONY: clean compile_translations dummy_translations extract_translations fake_translations help html_coverage \
migrate pull_translations push_translations quality requirements test update_translations validate \
production-requirements static
help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo " clean delete generated byte code and coverage reports"
@echo " compile_translations compile translation files, outputting .po files for each supported language"
@echo " dummy_translations generate dummy translation (.po) files"
@echo " extract_translations extract strings to be translated, outputting .mo files"
@echo " fake_translations generate and compile dummy translation files"
@echo " help display this help message"
@echo " html_coverage generate and view HTML coverage report"
@echo " migrate apply database migrations"
@echo " production-requirements install requirements for production"
@echo " pull_translations pull translations from Transifex"
@echo " push_translations push source translation files (.po) from Transifex"
@echo " quality run PEP8 and Pylint"
@echo " accept run acceptance tests"
@echo " requirements install requirements for local development"
@echo " serve serve Programs at 0.0.0.0:8004"
@echo " static gather all static assets for production"
@echo " test run tests and generate coverage report"
@echo " validate run tests and quality checks"
@echo " html_docs build html documents from rst docs and open in (default) browser"
@echo " detect_changed_source_translations check if translation files are up-to-date"
@echo " validate_translations install fake translations and check if translation files are up-to-date"
@echo ""
clean:
find . -name '*.pyc' -delete
coverage erase
requirements:
pip install -r requirements/local.txt --exists-action w
production-requirements:
pip install -r requirements.txt --exists-action w
test: clean
REUSE_DB=1 coverage run ./manage.py test programs --settings=programs.settings.test
coverage report
quality:
pep8 --config=.pep8 programs *.py acceptance_tests
pylint --rcfile=pylintrc programs *.py acceptance_tests
serve:
python manage.py runserver 0.0.0.0:8004
accept:
nosetests --with-ignore-docstrings -v acceptance_tests --with-xunit --xunit-file=acceptance_tests/xunit.xml
validate: test quality
migrate:
python manage.py migrate
html_coverage:
coverage html && open htmlcov/index.html
extract_translations:
python manage.py makemessages -l en -v1 -d django
python manage.py makemessages -l en -v1 -d djangojs
dummy_translations:
cd programs && i18n_tool dummy
compile_translations:
python manage.py compilemessages
fake_translations: extract_translations dummy_translations compile_translations
pull_translations:
tx pull -af
push_translations:
tx push -s
html_docs:
cd docs && make html && open _build/html/index.html
detect_changed_source_translations:
cd programs && i18n_tool changed
validate_translations: fake_translations detect_changed_source_translations
static: ## Gather all static assets for production
python manage.py collectstatic --noinput