-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (65 loc) · 2.27 KB
/
Makefile
File metadata and controls
83 lines (65 loc) · 2.27 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
74
75
76
77
78
79
80
81
82
83
.PHONY: help sync test test-unit test-retrieval test-cli test-integration lint typecheck check collect benchmark-list benchmark clean
PYTHON ?= python
PROJECT ?= my-project
BENCHMARK ?= $(PROJECT)
BASELINE ?= baseline-v1
help:
@echo "Code Context v2 commands"
@echo ""
@echo "Setup:"
@echo " make sync Install/sync dev dependencies with uv"
@echo ""
@echo "Validation:"
@echo " make check Run lint, tests, and ty"
@echo " make lint Run Ruff"
@echo " make test Run full pytest suite"
@echo " make typecheck Run ty check (warning-only for now)"
@echo " make collect Run pytest collection only"
@echo ""
@echo "Focused tests:"
@echo " make test-unit Run unit tests"
@echo " make test-retrieval Run retrieval tests"
@echo " make test-cli Run CLI tests"
@echo " make test-integration Run integration tests"
@echo ""
@echo "Benchmarks:"
@echo " make benchmark-list List local retrieval benchmark suites"
@echo " make benchmark BENCHMARK=x Run local benchmark suite"
@echo " make benchmark-compare BENCHMARK=x BASELINE=y Compare local baselines"
@echo " make benchmark-save BENCHMARK=x BASELINE=y Save local baseline"
@echo ""
@echo "Maintenance:"
@echo " make clean Remove Python caches"
sync:
uv sync --dev
lint:
uv run ruff check .
test:
uv run pytest
test-unit:
uv run pytest tests/unit
test-retrieval:
uv run pytest tests/retrieval
test-cli:
uv run pytest tests/cli
test-integration:
uv run pytest tests/integration
typecheck:
uv run ty check
collect:
uv run pytest --collect-only -q
check: lint test typecheck
benchmark-list:
uv run python -m scripts.benchmark_retrieval --list
benchmark:
uv run python -m scripts.benchmark_retrieval $(BENCHMARK)
benchmark-graph:
uv run python -m scripts.benchmark_retrieval $(BENCHMARK) --graph
benchmark-compare:
uv run python -m scripts.benchmark_retrieval $(BENCHMARK) --compare $(BASELINE)
benchmark-save:
uv run python -m scripts.benchmark_retrieval $(BENCHMARK) --save $(BASELINE)
clean:
find . -type d -name __pycache__ -prune -exec rm -rf {} +
find . -type d -name .pytest_cache -prune -exec rm -rf {} +
find . -type d -name .ruff_cache -prune -exec rm -rf {} +