-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (48 loc) · 1.34 KB
/
Makefile
File metadata and controls
57 lines (48 loc) · 1.34 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
.PHONY: test lint typecheck format build clean all help
# Default target
all: build test
help:
@echo "Available targets:"
@echo " all - Build and run all tests (default)"
@echo " test - Run all tests (pytest + typecheck + lint)"
@echo " pytest - Run pytest tests only"
@echo " typecheck - Run mypy type checking"
@echo " lint - Run ruff linting"
@echo " format - Format code with ruff"
@echo " build - Build the package"
@echo " clean - Clean build artifacts"
# Run all tests
test: build pytest typecheck lint
@echo "✅ All tests passed!"
# Run pytest
pytest:
@echo "🧪 Running pytest tests..."
uv run pytest
# Run type checking
typecheck:
@echo "🔍 Running mypy type checking..."
uv run mypy --explicit-package-bases *.py
# Run linting
lint:
@echo "🔧 Running ruff linting..."
uv run ruff check .
# Format code
format:
@echo "🎨 Formatting code with ruff..."
uv run ruff format .
# Build package
build:
@echo "🔨 Building package..."
@# Ensure dependencies are installed
uv sync --extra dev
@echo "📦 Package built successfully"
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
rm -rf __pycache__/
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
find . -name "*.pyc" -delete
find . -name "*.pyo" -delete
@echo "✨ Clean complete"