forked from Jason-Vaughan/TangleBrain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 1.14 KB
/
Copy pathMakefile
File metadata and controls
28 lines (21 loc) · 1.14 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
.PHONY: help venv lint test test-live clean
VENV := .venv
PY := $(VENV)/bin/python
help: ## Show this help.
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN {FS=":.*?## "} {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
venv: ## Create the dev venv and install editable with the delegate extra (httpx/PyYAML/mcp).
@if [ ! -d $(VENV) ]; then python3 -m venv $(VENV); fi
@$(PY) -m pip install --quiet --upgrade pip
@$(PY) -m pip install --quiet -e ".[delegate]"
@echo "venv: ready ($(VENV))"
lint: ## Smoke-check that all Python files parse cleanly.
@find tanglebrain tests -name "*.py" -not -path "*/__pycache__/*" -exec python3 -m py_compile {} +
@echo "lint: OK"
test: lint venv ## Lint + run the unit test suite (hermetic; HTTP is mocked).
@$(PY) -m unittest discover -s tests -p "test_*.py" -v
test-live: venv ## Opt-in: hit the real local endpoint your roster points at, end-to-end.
@TANGLEBRAIN_LIVE=1 $(PY) -m unittest tests.test_live -v
clean: ## Remove the venv and build artifacts.
@rm -rf $(VENV) build dist *.egg-info tanglebrain/*.egg-info
@find . -name "__pycache__" -type d -prune -exec rm -rf {} +
@echo "clean: OK"