-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (34 loc) · 1.52 KB
/
Makefile
File metadata and controls
51 lines (34 loc) · 1.52 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
PACKAGE ?= python_template
SRC_DIRS := src tests
.PHONY: help setup setup-dev lock update format format-check lint lint-fix typecheck test test-cov check build clean
.DEFAULT_GOAL := help
help: ## Show available tasks
@awk 'BEGIN {FS = ":.*##"; printf "\nAvailable tasks:\n\n"} /^[a-zA-Z0-9_.-]+:.*##/ {printf " %-20s %s\n", $$1, $$2} END {print ""}' $(MAKEFILE_LIST)
setup: ## Install the base project environment
uv sync
setup-dev: ## Install developer dependencies
uv sync --group dev
lock: ## Refresh uv.lock without upgrading pinned packages
uv lock
update: ## Upgrade dependencies and refresh uv.lock
uv lock --upgrade
format: ## Format the codebase with Ruff
uv run ruff format $(SRC_DIRS)
format-check: ## Check formatting without modifying files
uv run ruff format --check $(SRC_DIRS)
lint: ## Run Ruff lint checks
uv run ruff check $(SRC_DIRS)
lint-fix: ## Run Ruff lint checks and apply safe fixes
uv run ruff check --fix $(SRC_DIRS)
typecheck: ## Run Pyright type checking
uv run pyright
test: ## Run tests
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run pytest
test-cov: ## Run tests with coverage
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run pytest --cov=$(PACKAGE) --cov-report=term-missing
check: format-check lint typecheck test ## Run the full local quality gate
build: ## Build wheel and sdist artifacts
uv build
clean: ## Remove local build and tool caches
rm -rf .venv .pytest_cache .pyright .ruff_cache .mypy_cache build dist htmlcov .coverage .coverage.*
find . -type d -name '__pycache__' -prune -exec rm -rf {} +