1- .PHONY : clean compile_translations coverage diff_cover docs dummy_translations \
2- extract_translations fake_translations help pii_check pull_translations push_translations \
3- quality requirements selfcheck test test-all upgrade validate
1+ .PHONY : clean coverage diff_cover pii_check help quality requirements selfcheck test test-all upgrade validate test_migrations
42
53.DEFAULT_GOAL := help
64
@@ -25,29 +23,23 @@ coverage: clean ## generate and view HTML coverage report
2523 pytest --cov-report html
2624 $(BROWSER ) htmlcov/index.html
2725
28- docs : # # generate Sphinx HTML documentation, including API docs
29- tox -e docs
30- $(BROWSER ) docs/_build/html/index.html
31-
3226# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
3327PIP_COMPILE = pip-compile --rebuild --upgrade $(PIP_COMPILE_OPTS )
3428
3529upgrade : export CUSTOM_COMPILE_COMMAND=make upgrade
3630upgrade : # # update the requirements/*.txt files with the latest packages satisfying requirements/*.in
37- pip install -qr requirements/pip-tools.txt
31+ pip install -U - qr requirements/pip-tools.in
3832 # Make sure to compile files after any other files they include!
3933 $(PIP_COMPILE ) -o requirements/pip-tools.txt requirements/pip-tools.in
4034 $(PIP_COMPILE ) -o requirements/base.txt requirements/base.in
4135 $(PIP_COMPILE ) -o requirements/test.txt requirements/test.in
42- $(PIP_COMPILE ) -o requirements/doc.txt requirements/doc.in
4336 $(PIP_COMPILE ) -o requirements/quality.txt requirements/quality.in
44- $(PIP_COMPILE ) -o requirements/ci.txt requirements/ci.in
4537 $(PIP_COMPILE ) -o requirements/dev.txt requirements/dev.in
4638 # Let tox control the Django version for tests
4739 sed ' /^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
4840 mv requirements/test.tmp requirements/test.txt
4941
50- quality : # # check coding style with pycodestyle and pylint
42+ quality : selfcheck # # check coding style with pycodestyle and pylint
5143 tox -e quality
5244
5345pii_check : # # check for PII annotations on all Django models
@@ -63,36 +55,13 @@ test: clean ## run tests in the current virtualenv
6355diff_cover : test # # find diff lines that need test coverage
6456 diff-cover coverage.xml
6557
66- test-all : quality pii_check # # run tests on every supported Python/Django combination
58+ test-all : quality # # run tests on every supported Python/Django combination
6759 tox
6860
69- validate : quality pii_check test # # run tests and quality checks
61+ validate : quality test # # run tests and quality checks
7062
7163selfcheck : # # check that the Makefile is well-formed
7264 @echo " The Makefile is well-formed."
7365
74- # # Localization targets
75-
76- extract_translations : # # extract strings to be translated, outputting .mo files
77- rm -rf docs/_build
78- cd shoppingcart && ../manage.py makemessages -l en -v1 -d django
79- cd shoppingcart && ../manage.py makemessages -l en -v1 -d djangojs
80-
81- compile_translations : # # compile translation files, outputting .po files for each supported language
82- cd shoppingcart && ../manage.py compilemessages
83-
84- detect_changed_source_translations :
85- cd shoppingcart && i18n_tool changed
86-
87- pull_translations : # # pull translations from Transifex
88- tx pull -af --mode reviewed
89-
90- push_translations : # # push source translation files (.po) from Transifex
91- tx push -s
92-
93- dummy_translations : # # generate dummy translation (.po) files
94- cd shoppingcart && i18n_tool dummy
95-
96- build_dummy_translations : extract_translations dummy_translations compile_translations # # generate and compile dummy translation files
97-
98- validate_translations : build_dummy_translations detect_changed_source_translations # # validate translations
66+ test_migrations : # # check that Django migrations reflect all model changes
67+ tox -e migrations
0 commit comments