forked from xyTom/coding-tools-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (67 loc) · 3.61 KB
/
Copy pathMakefile
File metadata and controls
96 lines (67 loc) · 3.61 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
84
85
86
87
88
89
90
91
92
93
94
95
96
PYTHON ?= python3
COMPLIANCE_RUNNER := PYTHONDONTWRITEBYTECODE=1 $(PYTHON) -m tests.compliance.runner
PYTHON_SOURCES := coding_tools_mcp tests benchmarks
MYPY_TARGETS := coding_tools_mcp benchmarks/mcp_http.py benchmarks/runtime_latency.py benchmarks/swebench/run_smoke.py benchmarks/swebench/generate_reference_predictions.py benchmarks/real_workloads.py
REPORT_FLAG ?= --report
SWE_BENCH_ARGS ?=
DOGFOOD_PORT ?= 8765
RUFF_FLAGS ?= --exclude benchmarks/dogfood --ignore=E501
MYPY_FLAGS ?= --python-version 3.11 --disable-error-code union-attr --disable-error-code assignment --disable-error-code arg-type --disable-error-code no-untyped-def
.PHONY: lint typecheck test ci compliance test-protocol test-integration test-mcp-contract test-tool-golden test-security test-e2e test-runtime-semantics test-docs-required test-schema-drift dogfood-mcp dogfood-runner dogfood-smoke benchmark-latency benchmark-smoke benchmark-real-workloads swebench-reference-predictions swebench-preflight swebench-evaluate install-user publish-testpypi publish-pypi publish-all report
lint:
$(PYTHON) -m ruff check $(RUFF_FLAGS) $(PYTHON_SOURCES)
typecheck:
$(PYTHON) -m mypy $(MYPY_FLAGS) $(MYPY_TARGETS)
test:
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) -m unittest discover -s tests -p 'test_*.py'
ci: lint typecheck test test-protocol test-integration test-docs-required test-schema-drift dogfood-smoke benchmark-latency benchmark-smoke
compliance:
$(COMPLIANCE_RUNNER) --suite all $(REPORT_FLAG)
test-protocol: test-mcp-contract
test-integration: test-tool-golden test-security test-e2e test-runtime-semantics
test-mcp-contract:
$(COMPLIANCE_RUNNER) --suite mcp-contract $(REPORT_FLAG)
test-tool-golden:
$(COMPLIANCE_RUNNER) --suite tool-golden $(REPORT_FLAG)
test-security:
$(COMPLIANCE_RUNNER) --suite security $(REPORT_FLAG)
test-e2e:
$(COMPLIANCE_RUNNER) --suite e2e $(REPORT_FLAG)
test-runtime-semantics:
$(COMPLIANCE_RUNNER) --suite runtime-semantics $(REPORT_FLAG)
test-docs-required:
$(COMPLIANCE_RUNNER) --suite docs-required $(REPORT_FLAG)
test-schema-drift:
$(COMPLIANCE_RUNNER) --suite schema-drift $(REPORT_FLAG)
dogfood-mcp:
$(COMPLIANCE_RUNNER) --suite dogfood $(REPORT_FLAG)
dogfood-runner:
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) benchmarks/dogfood/mcp_deterministic_runner.py \
--endpoint http://127.0.0.1:$(DOGFOOD_PORT)/mcp \
--server-command "coding-tools-mcp --workspace {workspace} --host 127.0.0.1 --port $(DOGFOOD_PORT)"
dogfood-smoke: dogfood-mcp dogfood-runner
benchmark-latency:
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) benchmarks/runtime_latency.py
benchmark-smoke: swebench-preflight
benchmark-real-workloads:
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) benchmarks/real_workloads.py $(REAL_WORKLOAD_ARGS)
swebench-reference-predictions:
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) benchmarks/swebench/generate_reference_predictions.py \
--instance-id sympy__sympy-12419 \
--baseline-output reports/benchmark/swebench-reference-predictions/baseline_reference.jsonl \
--candidate-output reports/benchmark/swebench-reference-predictions/candidate_reference.jsonl \
--metadata-output reports/benchmark/swebench-reference-predictions/metadata.json
swebench-preflight:
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) benchmarks/swebench/run_smoke.py $(SWE_BENCH_ARGS)
swebench-evaluate:
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) benchmarks/swebench/run_smoke.py --run-evaluation $(SWE_BENCH_ARGS)
install-user:
scripts/install.sh
publish-testpypi:
PYTHON=$(PYTHON) scripts/publish-pypi.sh --testpypi
publish-pypi:
PYTHON=$(PYTHON) scripts/publish-pypi.sh --pypi
publish-all:
PYTHON=$(PYTHON) scripts/publish-pypi.sh --both
report:
$(COMPLIANCE_RUNNER) --write-report-only