forked from hicdex/hicdex
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
70 lines (53 loc) · 1.76 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
## ==> DipDup makefile
.ONESHELL:
.PHONY: test build docs
.DEFAULT_GOAL: all
##
## DEV=1 Install dev dependencies
DEV=1
## PLUGINS="" Install extras (`pytezos` only)
PLUGINS=""
## TAG=latest Docker tag for images built
TAG=latest
##
all: ## Run a whole CI pipeline (default)
make install lint test cover
install: ## Install project
poetry install \
`if [ -n "${PLUGINS}" ]; then for i in ${PLUGINS}; do echo "-E $$i "; done; fi` \
`if [ "${DEV}" = "0" ]; then echo "--no-dev"; fi`
lint: ## Lint with all tools
make isort black flake mypy
isort: ## Lint with isort
poetry run isort src tests
black: ## Lint with black
poetry run black src tests
flake: ## Lint with flake8
poetry run flakehell lint src tests
mypy: ## Lint with mypy
poetry run mypy src tests
test: ## Run test suite
poetry run pytest --cov-report=term-missing --cov=dipdup --cov-report=xml -n auto --dist loadscope -s -v tests
cover: ## Print coverage for the current branch
poetry run diff-cover coverage.xml
build: ## Build wheel Python package
poetry build
image: ## Build Docker image
docker build . -t dipdup:${TAG}
docker build . -t dipdup:${TAG}-pytezos --build-arg PLUGINS=pytezos
release-patch: ## Release patch version
bumpversion patch
git push --tags
git push
release-minor: ## Release minor version
bumpversion minor
git push --tags
git push
release-major: ## Release major version
bumpversion major
git push --tags
git push
docs: ## Build config/CLI references and copy to ../dipdup-docs
cd docs; rm -r _build; make install
help: ## Show this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'