forked from cadence-workflow/cadence-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (46 loc) · 1.59 KB
/
Makefile
File metadata and controls
55 lines (46 loc) · 1.59 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
.PHONY: pr install lint type-check test integration-test clean generate help
# Run all PR checks locally
pr: install generate lint type-check test integration-test
@echo "All PR checks passed!"
# Install dependencies
install:
@echo "Installing dependencies..."
uv sync --extra dev
# Generate idl files
generate:
@echo "Generating type files based on IDL..."
uv run python scripts/generate_proto.py
# Run linter
lint:
@echo "Running Ruff linter and fixing lint issues..."
uv tool run ruff check --fix
uv tool run ruff format
# Run type checker
type-check:
@echo "Running mypy type checker..."
uv run mypy cadence/ tests/
# Run unit tests
test:
@echo "Running unit tests..."
uv run pytest -v
# Run integration tests
integration-test:
@echo "Running integration tests..."
uv run pytest -v --integration-tests
# Clean generated files and caches
clean:
@echo "Cleaning up..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
# Show help
help:
@echo "Available targets:"
@echo " make pr - Run all PR checks (recommended before submitting PR)"
@echo " make install - Install dependencies"
@echo " make lint - Run Ruff linter"
@echo " make type-check - Run mypy type checker"
@echo " make test - Run unit tests"
@echo " make integration-test - Run integration tests"
@echo " make clean - Remove generated files and caches"
@echo " make help - Show this help message"