-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (33 loc) · 1.33 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
MSG_TEMPLATE='"{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"'
REPORT_DIR=./reports
APPS=oauth2_client
.PHONY: help clean_coverage coverage coverage_report diff_coverage pycodestyle pylint \
quality test
help: ## display this help message
@echo "Please use 'make <target>' where <target> is one of"
@perl -nle'print $& if m{^[0-9a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
include Makefile.docker
setup: ## Setup local dev env.
setup:
virtualenv -p python3 .venv && . .venv/bin/activate && \
pip install -r requirements/development.txt && \
pip install -r requirements/tox_requirements37.txt && \
touch .env
clean_coverage: ## Clean coverage reports.
clean_coverage:
mkdir -p ${REPORT_DIR} && \
coverage erase; \
rm -rf ${REPORT_DIR}/diff_coverage/diff_coverage_combined.html
pycodestyle: ## Invoke "make pycodestyle".
pycodestyle:
mkdir -p ${REPORT_DIR} && pycodestyle ${APPS} $(arg) | tee ${REPORT_DIR}/pycodestyle.report
pylint: ## Invoke "make pylint"
pylint:
mkdir -p ${REPORT_DIR} | pylint ${APPS} -j 0 \
--rcfile=./pylintrc --msg-template=${MSG_TEMPLATE} $(arg) |\
tee ${REPORT_DIR}/pylint.report
quality: ## Invoke "make pylint && make pycodestyle" on license.
quality: pylint pycodestyle
test: ## Run unit tests.
tox