-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (29 loc) · 888 Bytes
/
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
.DEFAULT_GOAL := help
.PHONY: init
init: ## Setup the requirements
$(info --- Setup ---)
@poetry install
.PHONY: format
format: ## Format the code
$(info --- Python format ---)
@poetry run black mysqldump_analyzer tests
@poetry run isort mysqldump_analyzer tests
.PHONY: style
style: init ## Run check
$(info Check Python isort)
@poetry run isort --check-only mysqldump_analyzer tests
$(info Check Python black)
@poetry run black --check mysqldump_analyzer tests
$(info Check Python mypy)
@poetry run mypy
.PHONY: test-unit
test-unit: init ## Run unit test
$(info --- Run Python unit-test ---)
@poetry run pytest
.PHONY: install
install: ## Run install
$(info --- Run Install ---)
@poetry install --only main
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'