-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 822 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (27 loc) · 822 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
32
33
34
35
36
37
38
PYTHON ?= python
.PHONY: format lint typecheck test check build
format:
$(PYTHON) -m isort src tests scripts
$(PYTHON) -m black src tests scripts
lint:
$(PYTHON) -m black --check src tests scripts
$(PYTHON) -m isort --check-only src tests scripts
$(PYTHON) -m flake8 src tests scripts
typecheck:
$(PYTHON) -m mypy
test:
$(PYTHON) -m pytest
check: lint typecheck test check-version
build: check-version
$(PYTHON) -m build
$(PYTHON) -m twine check dist/*
.PHONY: version check-version bump-patch bump-minor bump-major bump-version
export VERSION
version:
@$(PYTHON) scripts/bump-version.py --show
check-version:
@$(PYTHON) scripts/bump-version.py --check
bump-patch bump-minor bump-major:
@$(PYTHON) scripts/bump-version.py --bump $(@:bump-%=%)
bump-version:
@$(PYTHON) scripts/bump-version.py --set