-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (39 loc) · 1.51 KB
/
Copy pathMakefile
File metadata and controls
59 lines (39 loc) · 1.51 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
.DEFAULT_GOAL := help
PY ?= .venv/bin/python
PIP ?= .venv/bin/pip
.PHONY: help venv install dev test lint typecheck fmt health dry-run api docker-build up down
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
venv: ## Create the virtualenv
python3 -m venv .venv
install: ## Install runtime + dev dependencies into the venv
$(PIP) install -U pip
$(PIP) install -e ".[dev]"
dev: install ## Alias for install (dev setup)
test: ## Run the test suite
$(PY) -m pytest
lint: ## Lint with ruff (both checks CI runs)
$(PY) -m ruff check .
$(PY) -m ruff format --check .
fmt: ## Auto-format with ruff
$(PY) -m ruff format .
typecheck: ## Type-check with mypy --strict
$(PY) -m mypy core db modules taskqueue daemon api
health: dry-run ## Alias for dry-run
dry-run: ## Health checks + module registry, no network I/O
$(PY) -m daemon.main --dry-run
api: ## Run the API locally
$(PY) -m uvicorn api.main:app --reload --port 8000
seed: ## Seed a demo tenant + sample findings (needs Mongo)
$(PY) -m scripts.seed_dev
backup: ## Back up MongoDB (mongodump)
$(PY) -m scripts.backup
update-feeds: ## Refresh CDN/cloud scope feeds
$(PY) -m scripts.update_scope_feeds
docker-build: ## Build all images
docker compose -f docker/docker-compose.yml build
up: ## Start the full local stack
docker compose -f docker/docker-compose.yml up -d
down: ## Stop the local stack
docker compose -f docker/docker-compose.yml down