-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
115 lines (101 loc) · 3.87 KB
/
Makefile
File metadata and controls
115 lines (101 loc) · 3.87 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Long-Running Agent Skill - Development Makefile
# Uses uv for fast Python package management
.PHONY: help install dev-install test lint format clean run-example run-universal check-uv
# Default target
help:
@echo "Long-Running Agent Skill - Development Commands"
@echo "=============================================="
@echo ""
@echo "Setup Commands:"
@echo " install - Install uv and create virtual environment"
@echo " dev-install - Install development dependencies"
@echo ""
@echo "Development Commands:"
@echo " test - Run tests with pytest"
@echo " lint - Run linting with ruff"
@echo " format - Format code with black and ruff"
@echo " check - Run all checks (lint + test)"
@echo ""
@echo "Example Commands:"
@echo " run-universal - Run the universal example (works with any AI agent)"
@echo " run-example - Run the complete example (legacy DeepAgents)"
@echo ""
@echo "Utility Commands:"
@echo " clean - Clean up generated files"
@echo " check-uv - Check if uv is installed"
# Check if uv is installed
check-uv:
@command -v uv >/dev/null 2>&1 || { \
echo "❌ uv is not installed. Installing..."; \
curl -LsSf https://astral.sh/uv/install.sh | sh; \
echo "✅ uv installed successfully"; \
}
@echo "✅ uv is available: $$(uv --version)"
# Install uv and create virtual environment
install: check-uv
@echo "🚀 Setting up Long-Running Agent Skill development environment..."
uv venv --python 3.11
@echo "✅ Virtual environment created"
@echo ""
@echo "To activate the virtual environment:"
@echo " source .venv/bin/activate # On Unix/macOS"
@echo " .venv\\Scripts\\activate # On Windows"
# Install development dependencies
dev-install: check-uv
@echo "📦 Installing development dependencies..."
uv pip install -e ".[dev]"
@echo "✅ Development dependencies installed"
# Run tests
test: check-uv
@echo "🧪 Running tests..."
uv run pytest -v --cov=long-running-agent --cov-report=term-missing
@echo "✅ Tests completed"
# Run linting
lint: check-uv
@echo "🔍 Running linting checks..."
uv run ruff check .
uv run mypy scripts/ --ignore-missing-imports
@echo "✅ Linting completed"
# Format code
format: check-uv
@echo "🎨 Formatting code..."
uv run black .
uv run ruff check --fix .
@echo "✅ Code formatted"
# Run all checks
check: lint test
@echo "✅ All checks passed!"
# Run universal example (agent-agnostic)
run-universal: check-uv
@echo "🚀 Running universal example (works with any AI agent)..."
uv run python scripts/universal_example.py
# Run complete example (legacy DeepAgents)
run-example: check-uv
@echo "🚀 Running complete example (legacy DeepAgents)..."
@echo "⚠️ Note: This requires DeepAgents. Installing..."
uv pip install deepagents
uv run python scripts/complete_example.py
# Clean up generated files
clean:
@echo "🧹 Cleaning up generated files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type f -name "*.pyo" -delete 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true
rm -rf build/ dist/ .coverage htmlcov/ 2>/dev/null || true
@echo "✅ Cleanup completed"
# Development workflow
dev: install dev-install
@echo "🎉 Development environment ready!"
@echo ""
@echo "Next steps:"
@echo " 1. Activate virtual environment: source .venv/bin/activate"
@echo " 2. Run universal example: make run-universal"
@echo " 3. Run checks: make check"
@echo " 4. Format code: make format"
# Quick development setup
quick: check-uv dev-install run-universal
@echo "🚀 Quick development setup completed!"