-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
73 lines (56 loc) · 1.48 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
path := tts/app
.PHONY: help
help: ## Show this help message.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: dep-lock
dep-lock: ## Freeze DEV deps in 'requirements.txt' file.
@pip-compile requirements.in -o requirements.txt
.PHONY: dep-sync
dep-sync: ## Sync venv installation with DEV 'requirements.txt' file.
@pip-sync
.PHONY: lint
lint: black isort flake mypy ## Apply all the linters.
.PHONY: lint-check
lint-check: ## Check whether the codebase satisfies the linter rules.
@echo
@echo "Checking linter rules..."
@echo "========================"
@echo
@black --check $(path)
@isort --check $(path)
@flake8 $(path)
@mypy $(path)
.PHONY: black
black: ## Apply black.
@echo
@echo "Applying black..."
@echo "================="
@echo
@black --fast $(path)
@echo
.PHONY: isort
isort: ## Apply isort.
@echo "Applying isort..."
@echo "================="
@echo
@isort $(path)
.PHONY: flake
flake: ## Apply flake8.
@echo
@echo "Applying flake8..."
@echo "================="
@echo
@flake8 $(path)
.PHONY: mypy
mypy: ## Apply mypy.
@echo
@echo "Applying mypy..."
@echo "================="
@echo
@mypy $(path)
.PHONY: run-docker-bundle
run-docker-bundle: ## Run the app in a docker container.
docker-compose -f docker-compose-bundle.yml up -d
.PHONY: kill-docker-bundle
kill-docker-bundle: ## Stop the running docker container.
docker-compose -f docker-compose-bundle.yml down