forked from IntegroLabs/hicdex
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
71 lines (52 loc) · 1.81 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
.ONESHELL:
.PHONY: $(MAKECMDGOALS)
##
## 🚧 DipDup developer tools
##
## DEV=1 Whether to install dev dependencies
DEV=1
## TAG=latest Tag for the `image` command
TAG=latest
##
help: ## Show this help (default)
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
all: ## Run a whole CI pipeline: lint, run tests, build docs
make install lint test docs
install: ## Install project dependencies
poetry install \
`if [ -n "${EXTRAS}" ]; then for i in ${EXTRAS}; do echo "-E $$i "; done; fi` \
`if [ "${DEV}" = "0" ]; then echo "--no-dev"; fi`
lint: ## Lint with all tools
make isort black flake mypy
test: ## Run test suite
poetry run pytest --cov-report=term-missing --cov=hicdex --cov-report=xml -n auto --dist loadscope -s -v tests
##
isort: ## Format with isort
poetry run isort src tests
black: ## Format with black
poetry run black src tests
flake: ## Lint with flake8
poetry run flakeheaven lint src tests
mypy: ## Lint with mypy
poetry run mypy --disallow-untyped-defs src tests
cover: ## Print coverage for the current branch
poetry run diff-cover --compare-branch `git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'` coverage.xml
build: ## Build Python wheel package
poetry build
image: ## Build Docker image
docker buildx build . -t hicdex:${TAG}
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
clean: ## Remove all files from .gitignore except for `.venv`
git clean -xdf --exclude=".venv"
##