-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
36 lines (27 loc) · 908 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
.PHONY: init test lint pretty precommit_install
BIN = .venv/bin/
CODE = flake8_breakpoint
init:
python3 -m venv .venv
poetry install
test:
$(BIN)pytest --verbosity=2 --showlocals --strict --cov=$(CODE) -k "$(k)"
lint:
$(BIN)flake8 --jobs 4 --statistics --show-source $(CODE) tests
$(BIN)pylint --jobs 4 --rcfile=setup.cfg $(CODE)
$(BIN)mypy $(CODE) tests
$(BIN)black --py36 --skip-string-normalization --line-length=79 --check $(CODE) tests
$(BIN)pytest --dead-fixtures --dup-fixtures
pretty:
$(BIN)isort --apply --recursive $(CODE) tests
$(BIN)black --py36 --skip-string-normalization --line-length=79 $(CODE) tests
$(BIN)unify --in-place --recursive $(CODE) tests
precommit_install:
echo '#!/bin/sh\nmake lint test\n' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
bump_major:
$(BIN)bumpversion major
bump_minor:
$(BIN)bumpversion minor
bump_patch:
$(BIN)bumpversion patch