Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (45 loc) · 1.58 KB
/
Copy pathMakefile
File metadata and controls
60 lines (45 loc) · 1.58 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
58
59
60
# Wybthon demo template: local development helpers.
#
# Everything runs through uv; `make sync` once, then the rest just works.
PORT ?= 8000
.PHONY: help sync manifest check serve dev fmt lint typecheck test e2e ci clean
help:
@echo "Wybthon demo template: make targets"
@echo " make sync uv sync --all-groups (create .venv + install tools)"
@echo " make manifest Regenerate app/manifest.json + index.html cache busters"
@echo " make check Fail if generated outputs are stale (CI-friendly)"
@echo " make serve Serve the static site at http://localhost:$(PORT)"
@echo " make dev manifest + serve"
@echo " make fmt black + ruff --fix"
@echo " make lint ruff + black --check"
@echo " make typecheck mypy"
@echo " make test pytest (unit tests)"
@echo " make e2e Playwright browser smoke test (needs chromium installed)"
@echo " make ci Everything CI runs: lint, typecheck, test, check"
@echo " make clean Remove caches and __pycache__ trees"
sync:
uv sync --all-groups
manifest:
uv run python tools/build_manifest.py
check:
uv run python tools/build_manifest.py --check
serve:
@echo "Serving on http://localhost:$(PORT)"
uv run python -m http.server $(PORT)
dev: manifest serve
fmt:
uv run black .
uv run ruff check --fix .
lint:
uv run ruff check .
uv run black --check .
typecheck:
uv run mypy
test:
uv run pytest
e2e:
RUN_E2E=1 uv run pytest tests/e2e -m e2e -v
ci: lint typecheck test check
clean:
rm -rf .pytest_cache .mypy_cache .ruff_cache
find . -type d -name __pycache__ -prune -exec rm -rf {} +