-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (35 loc) · 1019 Bytes
/
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
all: set-git set-pre-commit set-lint set-test set-pipreqs
dev-env: set-git set-pre-commit set-lint set-test set-pipreqs
dep: extract-requirements
test: pytest
clean: clean-pyc clean-test
##### dev-env #####
set-git:
git config --local commit.template .gitmessage.txt
set-pre-commit:
pip3 install --no-cache-dir pre-commit==2.11.1
pre-commit install
set-lint:
pip3 install pylint==2.7.4
set-test:
pip3 install --no-cache-dir pytest==6.2.1 pytest-cov==2.10.1 pytest_xdist==2.2.0
set-pipreqs:
pip3 install --no-cache-dir pipreqs==0.4.10
##### dep #####
extract-requirements:
pipreqs --force --savepath requirements.txt src
pytest:
pytest -o log_cli=true -n 1 --cov-report term-missing tests/
check:
pre-commit run -a
##### clean #####
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 {} +
clean-test:
rm -f .coverage
rm -f .coverage.*
rm -rf .pytest_cache
rm -rf .mypy_cache