forked from ellmetha/django-machina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (44 loc) · 1.55 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
.PHONY: init install qa lint tests spec coverage docs
init:
pipenv install --three --dev
# DEVELOPMENT
# ~~~~~~~~~~~
# The following rules can be used during development in order to compile staticfiles, generate
# locales, build documentation, etc.
# --------------------------------------------------------------------------------------------------
# Generates assets packaged with django-machina.
staticfiles:
npm run gulp
# Generate the project's .po files.
messages:
cd machina && pipenv run python -m django makemessages -a
# Compiles the project's .po files.
compiledmessages:
cd machina && pipenv run python -m django compilemessages
# Builds the documentation.
docs:
cd docs && rm -rf _build && pipenv run make html
# QUALITY ASSURANCE
# ~~~~~~~~~~~~~~~~~
# The following rules can be used to check code quality, import sorting, etc.
# --------------------------------------------------------------------------------------------------
qa: lint isort
# Code quality checks (eg. flake8, eslint, etc).
lint:
pipenv run flake8
# Import sort checks.
isort:
pipenv run isort --check-only --recursive --diff machina tests
# TESTING
# ~~~~~~~
# The following rules can be used to trigger tests execution and produce coverage reports.
# --------------------------------------------------------------------------------------------------
# Just runs all the tests!
tests:
pipenv run py.test
# Collects code coverage data.
coverage:
pipenv run py.test --cov-report term-missing --cov machina
# Run the tests in "spec" mode.
spec:
pipenv run py.test --spec -p no:sugar