Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (52 loc) · 2.45 KB
/
Copy pathMakefile
File metadata and controls
73 lines (52 loc) · 2.45 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
61
62
63
64
65
66
67
68
69
70
71
72
73
.PHONY: format lint type-check pytest doc-coverage coverage coverage-html check \
docs-links ui-dev ui-build ui-test ui-lint ui-format ui-preview ui-analyze ui-check \
all-checks
# ── Python ────────────────────────────────────────────────────────────────────
format:
uv run ruff format .
lint:
uv run ruff check . --fix
type-check:
uv run pyrefly check --baseline .github/pyrefly-baseline.json
pytest:
uv run pytest
doc-coverage:
uv run interrogate src
# Regenerate the Related/Code blocks and docs/INDEX.md. Idempotent; CI runs the
# same script on every push to main, so a local run only saves a later commit.
docs-links:
uv run python scripts/generate_doc_links.py
# Line coverage. `--cov=scripts` is not optional and not cosmetic: sonar.sources
# is `src,scripts`, so SonarCloud counts every executable line under scripts/ as
# a line to cover whether or not the report mentions it. Omitting the directory
# does not exclude it — it reports all of it as uncovered, which once put
# new-code coverage at 37.8% on a PR whose script was covered at 99% locally.
# Keep this scope identical to the Pytest step in .github/workflows/ci.yml, or
# the number you read here is not the number the gate reads.
coverage:
uv run pytest --cov=cgis --cov=scripts --cov-report=term-missing
# Same scope, browsable. Writes htmlcov/ (git-ignored); open htmlcov/index.html.
coverage-html:
uv run pytest --cov=cgis --cov=scripts --cov-report=html
# Full Python verification (run before every commit/PR)
check: format lint type-check pytest doc-coverage
# ── UI (ui/) ──────────────────────────────────────────────────────────────────
ui-dev:
cd ui && bun dev
ui-build:
cd ui && bun run build
ui-test:
cd ui && bun run test:run
ui-lint:
cd ui && bun lint
ui-format:
cd ui && bun run format
ui-preview:
cd ui && bun run preview
ui-analyze:
cd ui && bun run analyze
# Full UI verification
ui-check: ui-lint ui-build ui-test
# ── Combined ──────────────────────────────────────────────────────────────────
# Run all checks (Python + UI)
all-checks: check ui-check