-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
executable file
·82 lines (61 loc) · 2.13 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!make
define USAGE
Commands:
clean Remove all generated files
clean-pyc Remove compiled bytecode of source files
clean-build Remove built packages
format Formats the code
generate-changelog Generates the Changelog.md file
install Install pipenv, dependencies and package with editable mode
install-dev Install pipenv, development dependencies and package with editable mode
install-pipenv Install pipenv to manage Python dependencies
lint Run linter
test Run tests and validate project
update-patch-version Increase current patch version
update-minor-version Increase current minor version
update-major-version Increase current major version
validate Validate with linter and formatter
validate-formatting Validates if the formating is correct
endef
export USAGE
TEST := -test
help:
@echo "$$USAGE"
build:
@pipenv run python setup.py sdist bdist_wheel
install: install-pipenv
@pipenv install
install-dev: install-pipenv
@pipenv install
@pipenv install --dev
install-pipenv:
@pip3 install pipenv
test: validate
@pipenv run python -m pytest -vv
generate-changelog:
@git-changelog . -s angular -o CHANGELOG.md
format:
@pipenv run isort -rc .
@pipenv run black .
validate: validate-formating lint static-type-check
validate-formating:
@pipenv run black --check --diff .
lint:
@pipenv run flake8 --count
static-type-check:
@pipenv run mypy .
clean: clean-pyc clean-build
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 {} +
@find . -name '.pytest_cache' -exec rm -fr {} +
clean-build:
@rm -rf dist build .eggs checkarg.egg-info
update-patch-version:
@pipenv run bump2version patch setup.py
update-minor-version:
@pipenv run bump2version minor setup.py
update-major-version:
@pipenv run bump2version major setup.py