forked from anthropics/claude-cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (47 loc) · 1.48 KB
/
Makefile
File metadata and controls
56 lines (47 loc) · 1.48 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
.PHONY: help format lint check fix test clean install
# Default target
help:
@echo "Available targets:"
@echo " make format - Format code with ruff"
@echo " make lint - Run ruff linting checks"
@echo " make check - Run all checks (format check + lint)"
@echo " make fix - Auto-fix issues with ruff"
@echo " make test - Run tests"
@echo " make install - Install dependencies"
@echo " make clean - Remove cache files"
# Format code with ruff
format:
@echo "Formatting code with ruff..."
uv run ruff format .
# Check if code is formatted without changing it
format-check:
@echo "Checking code formatting with ruff..."
uv run ruff format --check .
# Run ruff linting
lint:
@echo "Running ruff linting..."
uv run ruff check .
# Run all checks
check: format-check lint
@echo "All checks completed!"
# Auto-fix issues with ruff
fix:
@echo "Auto-fixing issues with ruff..."
uv run ruff check --fix .
uv run ruff format .
# Run tests
test:
@echo "Running tests..."
uv run pytest
# Install dependencies
install:
@echo "Installing dependencies..."
uv sync --all-extras
# Clean cache files
clean:
@echo "Cleaning cache files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
@echo "Cache cleaned!"