-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
49 lines (34 loc) · 1.19 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
.PHONY: install qa lint tests spec coverage docs
init:
pipenv install --dev --three
# DEVELOPMENT
# ~~~~~~~~~~~
# The following rules can be used during development in order to compile staticfiles, generate
# locales, build documentation, etc.
# --------------------------------------------------------------------------------------------------
shell:
pipenv run ipython
# 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 js_urls 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 js_urls
# Run the tests in "spec" mode.
spec:
pipenv run py.test --spec