-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (34 loc) · 1.5 KB
/
Copy pathMakefile
File metadata and controls
48 lines (34 loc) · 1.5 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
# Mirrors .github/workflows/test.yml so `make check` == CI.
# Uses .venv/ (created on demand). Python 3.12 per design doc.
VENV ?= .venv
PY := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
BIN := $(VENV)/bin
.PHONY: help install lint fmt typecheck test check ci demo view-demo clean distclean
help: ## show this help
@awk 'BEGIN {FS = ":.*## "} /^[a-zA-Z][a-zA-Z_-]*:.*## / {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
$(VENV)/bin/activate:
python3.12 -m venv $(VENV)
$(PIP) install --upgrade pip
install: $(VENV)/bin/activate ## create venv + install package with [dev] extras
$(PIP) install -e ".[dev]"
lint: ## ruff check (matches CI)
$(BIN)/ruff check nodemind tests
fmt: ## ruff format + autofix
$(BIN)/ruff format nodemind tests
$(BIN)/ruff check --fix nodemind tests
typecheck: ## mypy strict on the package (matches CI)
$(BIN)/mypy nodemind
test: ## pytest with coverage (matches CI)
$(BIN)/pytest --cov=nodemind --cov-report=term-missing -q
check: lint typecheck test ## run the full CI gate locally
ci: check ## alias
demo: ## run the demo agent (requires ANTHROPIC_API_KEY)
$(PY) -m nodemind.demo
view-demo: ## generate a sample event log + open the viewer in a browser
$(PY) -m nodemind.viewer --sample ./demo-run
clean: ## remove caches, bytecode, coverage
rm -rf .pytest_cache .ruff_cache .mypy_cache .coverage htmlcov
find . -type d -name __pycache__ -not -path './$(VENV)/*' -exec rm -rf {} +
distclean: clean ## also nuke the virtualenv
rm -rf $(VENV)