-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 1.22 KB
/
Makefile
File metadata and controls
46 lines (35 loc) · 1.22 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
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := help
.PHONY: install run format lint test verify docs-lint docs-build docs-serve help
install: ## Install dependencies and configure git hooks and commit template
@uv sync --all-groups
@if [ -d .git ]; then \
uv run pre-commit install; \
git config --local commit.template .gitmessage; \
fi
run: ## Run the application
@uv run python -m python_project_template.app -c config/config.yaml -l config/logging.yaml
format: ## Run code formatting
@uv run ruff check --fix
@uv run ruff format
lint: ## Run linting
@uv lock --check
@uv run ruff check
@uv run ruff format --check
@uv run mypy
test: ## Run tests
@uv run pytest
verify: format lint test ## Run all verification steps (formatting, linting, testing)
docs-lint: ## Run documentation linting
@uv run pymarkdownlnt scan docs
docs-build: ## Build documentation
@uv run mkdocs build
docs-serve: ## Serve documentation locally
@uv run mkdocs serve
help: ## Show help message
@echo "Usage: make [target]"
@echo ""
@echo "Available targets:"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(filter-out .env,$(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'