-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (43 loc) · 1.76 KB
/
Copy pathMakefile
File metadata and controls
63 lines (43 loc) · 1.76 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
.PHONY: help setup test lint format build clean
help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
setup: ## Install all dependencies
uv sync
test: ## Run all tests
uv run pytest
test-verbose: ## Run tests with verbose output
uv run pytest -v
test-coverage: ## Run tests with coverage report
uv run pytest --cov=packages --cov-report=term-missing
lint: ## Run linter (ruff)
uv run ruff check .
lint-fix: ## Fix linting issues automatically
uv run ruff check --fix .
format: ## Format code with ruff
uv run ruff format .
format-check: ## Check code formatting without changes
uv run ruff format --check .
typecheck: ## Run type checker (mypy)
uv run mypy packages/
check: lint format-check typecheck ## Run all code quality checks
build: ## Build all packages
uv build
cli: ## Run the SCP CLI (pass args with ARGS="...")
uv run scp-cli $(ARGS)
scan: ## Scan a directory for scp.yaml files (use DIR=path)
uv run scp-cli scan $(DIR)
scan-neo4j: ## Scan and export to Neo4j (use DIR=path, requires NEO4J_URI)
uv run scp-cli scan $(DIR) --export neo4j
test-constructor: ## Run constructor package tests
cd packages/constructor && uv run pytest
lint-constructor: ## Lint constructor package
cd packages/constructor && uv run ruff check .
clean: ## Clean build artifacts and caches
rm -rf build/ dist/ *.egg-info/
rm -rf packages/*/*.egg-info/
rm -rf .pytest_cache/ packages/*/.pytest_cache/
rm -rf .ruff_cache/ packages/*/.ruff_cache/
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
clean-venv: ## Remove virtual environments
rm -rf .venv/ packages/*/.venv/
clean-all: clean clean-venv ## Full cleanup including venvs