Files
stork/Makefile
T
ilia 203f469ee1
CI / secret-scan (pull_request) Successful in 32s
CI / python-ci (pull_request) Successful in 56s
Add public demo seed set and document the live demo board
Ship Mira/Noa/Lior/Elena/Ezra seed data, STORK_SEED_FILE support,
and a public-ready README with the demo /b/… link.
2026-08-07 17:04:27 -04:00

38 lines
1.5 KiB
Makefile

.PHONY: help install test lint run docker-build seed
help: ## Show targets
@grep -E '^[a-zA-Z_-]+:.*?##' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-16s %s\n", $$1, $$2}'
install: ## Install runtime + dev deps into .venv (prefers python3.12)
@PY=$$(command -v python3.12 || command -v python3); \
$$PY -m venv .venv
.venv/bin/pip install -U pip
.venv/bin/pip install -r requirements-dev.txt
lint: ## Ruff lint (CI hard gate)
ruff check .
test: ## Pytest (CI hard gate)
pytest -q
run: ## Local uvicorn on :8094 (needs .env)
@test -f .env || (echo "Copy .env.example to .env first" && exit 1)
set -a && . ./.env && set +a && uvicorn stork.app:app --reload --host 127.0.0.1 --port 8094
seed: ## Seed example names (usage: make seed STORK_BOARD_ID=b_… [STORK_SEED_FILE=data/demo-names.example.json])
@if [ -z "$(STORK_BOARD_ID)" ] && [ -z "$(STORK_INVITE)" ]; then \
echo "Set STORK_BOARD_ID=b_… or STORK_INVITE=…"; exit 1; \
fi
STORK_URL="$(or $(STORK_URL),http://127.0.0.1:8094)" \
STORK_BOARD_ID="$(STORK_BOARD_ID)" STORK_INVITE="$(STORK_INVITE)" \
STORK_SEED_FILE="$(STORK_SEED_FILE)" \
.venv/bin/python scripts/seed_names.py
create-board: ## Create empty board + print share URL (usage: make create-board [STORK_BOARD_TITLE='…'])
STORK_URL="$(or $(STORK_URL),http://127.0.0.1:8094)" \
STORK_BOARD_TITLE="$(or $(STORK_BOARD_TITLE),Name board)" \
.venv/bin/python scripts/create_board.py
docker-build: ## Build local image
docker build -t homelab-stork:latest .