-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (49 loc) · 1.64 KB
/
Makefile
File metadata and controls
66 lines (49 loc) · 1.64 KB
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
args := $(wordlist 2, 100, $(MAKECMDGOALS))
.DEFAULT:
@echo "No such command (or you pass two or many targets to ). List of possible commands: make help"
.DEFAULT_GOAL := help
##@ Local development
.PHONY: help
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target> <arg=value>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m %s\033[0m\n\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: init
init: ## Initialize development environment
@uv venv
@source .venv/bin/activate
@uv sync --all-extras
@uv run prek install
.PHONY: run
run: ## Run API part with hot reload
@uv run python -m taskiq_dashboard.api
.PHONY: run_docs
run_docs: ## Run documentation server
@uv run zensical serve
.PHONY: run_infra
run_infra: ## Run rabbitmq in docker for integration tests
@docker compose -f docker-compose.yml up -d postgres
.PHONY: build
build: ## Build docker image with tag "local"
@docker build --progress=plain -t taskiq_dashboard:local .
##@ Testing and formatting
.PHONY: ruff
ruff: ## Run ruff linter
@uv run ruff check .
.PHONY: ty
ty: ## Run mypy type checker
@uv run ty check taskiq_dashboard
.PHONY: djlint
djlint: ## Run djlint template linter
@uv run djlint - --lint
.PHONY: lint
lint: ruff ty djlint ## Run all linters
@echo "All linters passed!"
.PHONY: format
format: ## Run formatting
@uv run ruff check . --fix --unsafe-fixes
@uv run ruff format .
.PHONY: test
test: ## Run all tests
@uv run pytest
.PHONY: test_cov
test_cov: ## Generate test coverage report
@uv run pytest -m 'not linting' --cov='taskiq_dashboard' --cov-report=html