-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
113 lines (86 loc) · 3.12 KB
/
Makefile
File metadata and controls
113 lines (86 loc) · 3.12 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
.PHONY: help install install-dev test test-cov lint format clean build publish
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Available targets:'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install package
uv sync
install-dev: ## Install package with dev dependencies
uv sync --all-extras
test: ## Run tests
uv run pytest
test-cov: ## Run tests with coverage
uv run pytest --cov=packages --cov-report=html --cov-report=term
test-watch: ## Run tests in watch mode
uv run pytest-watch
lint: ## Run linters
uv run black --check packages/ tests/
uv run isort --check-only packages/ tests/
uv run ruff check packages/ tests/
uv run mypy packages/
format: ## Format code
uv run black packages/ tests/
uv run isort packages/ tests/
security: ## Run security checks
uv run bandit -r packages/ -ll
uv run safety check
clean: ## Clean build artifacts
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf .ruff_cache
rm -rf htmlcov/
rm -rf .coverage
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name '*.pyc' -delete
build: clean ## Build package
uv build
publish-test: build ## Publish to TestPyPI (for testing)
uv publish --publish-url https://test.pypi.org/legacy/
publish: build ## Publish to PyPI (requires authentication)
@echo "⚠️ Publishing to PyPI. Make sure version is bumped!"
@echo "Press Ctrl+C to cancel, or Enter to continue..."
@read dummy
uv publish
release-check: ## Check if ready for release
@echo "🔍 Running release checks..."
@echo "\n1. Running tests..."
uv run pytest -v
@echo "\n2. Checking governance..."
uv run paracle governance health
@echo "\n3. Building package..."
uv build
@echo "\n4. Checking package..."
uv run twine check dist/*
@echo "\n✅ Release checks passed!"
release-patch: ## Create patch release (0.0.X) [Windows: powershell scripts/bump-version.ps1 patch]
@echo "Creating patch release..."
@scripts/bump-version.sh patch
release-minor: ## Create minor release (0.X.0) [Windows: powershell scripts/bump-version.ps1 minor]
@echo "Creating minor release..."
@scripts/bump-version.sh minor
release-major: ## Create major release (X.0.0) [Windows: powershell scripts/bump-version.ps1 major]
@echo "Creating major release..."
@scripts/bump-version.sh major
docs-serve: ## Serve documentation locally
uv run mkdocs serve
docs-build: ## Build documentation
uv run mkdocs build
pre-commit-install: ## Install pre-commit hooks
uv run pre-commit install
pre-commit-run: ## Run pre-commit on all files
uv run pre-commit run --all-files
validate: ## Validate governance compliance
uv run paracle validate --all
validate-ai: ## Validate AI instruction files
uv run paracle validate ai-instructions
validate-governance: ## Validate .parac/ structure
uv run paracle validate governance
validate-roadmap: ## Validate roadmap consistency
uv run paracle validate roadmap
cli-hello: ## Run CLI hello command
uv run paracle hello
all: install-dev lint test ## Run install, lint, and test