This repository has been archived by the owner on May 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (49 loc) · 1.69 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
.PHONY: clean-pyc clean-build clean lint-app lint-tests lint-seed lint-worker lint test cov
.DEFAULT_GOAL: help
help:
@echo "clean - remove all build, test, coverage and Python artifacts"
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-test - remove test and coverage artifacts"
@echo "lint - check style with pylint"
@echo "lint-tests - check style of tests with pylint"
@echo "test - run tests quickly with the default Python"
@echo "cov - run tests and check coverage with the default Python"
clean: clean-build clean-pyc clean-test
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -rf {} +
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
lint-app:
pylint --rcfile=.pylintrc app -f parseable -r n && \
pycodestyle app --max-line-length=120 && \
pydocstyle app
lint-tests:
pylint --rcfile=.pylintrc tests -f parseable -r n && \
pycodestyle tests --max-line-length=120 && \
pydocstyle tests
lint-seed:
pylint --rcfile=.pylintrc seed -f parseable -r n && \
pycodestyle seed --max-line-length=120 && \
pydocstyle seed
lint-worker:
pylint --rcfile=.pylintrc worker -f parseable -r n && \
pycodestyle worker --max-line-length=120 && \
pydocstyle worker
lint:
pylint --rcfile=.pylintrc app tests seed worker -f parseable -r n && \
pycodestyle app tests seed worker --max-line-length=120 && \
pydocstyle app tests seed worker
test:
pytest tests
cov:
pytest --cov-report html \
--cov-config .coveragerc \
--cov=app tests