-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
121 lines (89 loc) · 3.87 KB
/
Copy pathMakefile
File metadata and controls
121 lines (89 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
116
117
118
119
120
121
# ==============================================================================
# Agentomatic — Drop agents, not code
# Framework Lifecycle Makefile
# ==============================================================================
.DEFAULT_GOAL := help
.PHONY: help install dev test lint format clean build publish docs
# === Setup ===
install: ## Install agentomatic (core)
uv sync
dev: ## Install with ALL dev dependencies
uv sync --all-extras --group dev --group docs
uv run pre-commit install
# === Quality ===
lint: ## Run ruff linter
uv run ruff check src/agentomatic/ tests/
format: ## Auto-format code
uv run ruff check --fix src/agentomatic/ tests/
uv run ruff format src/agentomatic/ tests/
format-check: ## Verify formatting (read-only, for CI)
uv run ruff format --check src/agentomatic/ tests/
typecheck: ## Run mypy type checking
uv run mypy src/agentomatic/ --ignore-missing-imports
precommit: ## Run all pre-commit hooks
uv run pre-commit run --all-files
# === Testing ===
test: ## Run all tests
uv run pytest tests/ -v
test-cov: ## Run tests with coverage report
uv run pytest tests/ --cov=agentomatic --cov-report=html --cov-report=term --cov-report=xml -v
test-quick: ## Run tests (fast, no verbose)
uv run pytest tests/ -q
test-watch: ## Run tests in watch mode (requires pytest-watch)
uv run ptw tests/ -- -v
test-studio: ## Run studio-specific tests
uv run pytest tests/test_studio.py -v --override-ini="addopts="
# === Build & Publish ===
build: clean ## Build the package
uv build
publish: build ## Publish to PyPI
uv run twine upload dist/*
publish-test: build ## Publish to Test PyPI
uv run twine upload --repository testpypi dist/*
# === Documentation ===
docs-serve: ## Serve docs locally (live reload)
uv run mkdocs serve
docs-build: ## Build static docs site
uv run mkdocs build
docs-check: ## Verify docs build (strict mode)
uv run mkdocs build --strict
docs-deploy: ## Deploy docs to GitHub Pages (via mike)
uv run mike deploy --push --update-aliases $$(uv run python -c "from agentomatic import __version__; print(__version__)") latest
uv run mike set-default --push latest
# === CLI ===
init: ## Scaffold a new agent (usage: make init AGENT=my_agent TEMPLATE=basic)
uv run agentomatic init $(AGENT) --template $(or $(TEMPLATE),basic) --dir agents
run: ## Run the platform
uv run agentomatic run --agents-dir agents --reload
run-ui: ## Run the platform with Chainlit chat UI
uv run agentomatic run --agents-dir agents --reload --with-ui
run-studio: ## Run the platform with Studio debug UI
uv run agentomatic run --agents-dir agents --reload --studio
demo: ## Launch demo platform with Studio for E2E testing
uv run agentomatic demo
list-agents: ## List discovered agents
uv run agentomatic list --agents-dir agents
doctor: ## Check environment health
uv run agentomatic doctor
# === Clean ===
clean: ## Remove build artifacts
rm -rf build/ dist/ *.egg-info src/*.egg-info
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 .mypy_cache -exec rm -rf {} + 2>/dev/null || true
rm -rf htmlcov/ .coverage coverage.xml site/
# === Info ===
version: ## Show package version
@uv run python -c "from agentomatic import __version__; print(f'agentomatic v{__version__}')"
structure: ## Show package structure
@find src/agentomatic -type f -name "*.py" | sort
check-all: lint typecheck test docs-check ## Run all quality checks
@echo "✅ All checks passed!"
check-ci: lint format-check typecheck test-cov docs-check ## Full CI parity check (lint + format-check + typecheck + coverage)
@echo "✅ CI check passed!"
# === Help ===
help: ## Show this help
@echo "⚡ Agentomatic — Drop agents, not code"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'