-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 1.18 KB
/
Copy pathMakefile
File metadata and controls
38 lines (29 loc) · 1.18 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
.PHONY: all install dev test clean help
VENV := .venv
PYTHON := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
all: install ## Default: create venv and install pact
$(VENV)/bin/activate:
python3 -m venv $(VENV)
install: $(VENV)/bin/activate ## Install pact in editable mode
$(PIP) install -e ".[dev]"
@echo ""
@echo " Pact installed. Activate with:"
@echo " source $(VENV)/bin/activate"
@echo ""
@echo " Then try:"
@echo " pact init my-project"
@echo " pact --help"
dev: $(VENV)/bin/activate ## Install with LLM backend support
$(PIP) install -e ".[dev,llm]"
@echo ""
@echo " Pact installed with LLM support."
test: $(VENV)/bin/activate ## Run all tests
$(VENV)/bin/python -m pytest tests/ -v
test-quick: $(VENV)/bin/activate ## Run tests (stop on first failure)
$(VENV)/bin/python -m pytest tests/ -x -q
clean: ## Remove venv, caches, build artifacts
rm -rf $(VENV) dist build *.egg-info .pytest_cache
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'