-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 721 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 721 Bytes
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
.PHONY: init test lint format
CODE = flake8_patch
TEST = poetry run pytest --verbosity=2 --showlocals --strict
init:
poetry install
echo '#!/bin/sh\nmake lint test\n' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
test:
$(TEST) -k "$(k)"
lint:
poetry run flake8 --jobs 4 --statistics --show-source $(CODE) tests
poetry run pylint --jobs 4 --rcfile=setup.cfg $(CODE)
poetry run mypy $(CODE) tests
poetry run black --target-version py36 --check $(CODE) tests
format:
poetry run isort --apply --recursive $(CODE) tests
poetry run black --target-version py36 $(CODE) tests
bump_major:
poetry run bumpversion major
bump_minor:
poetry run bumpversion minor
bump_patch:
poetry run bumpversion patch