microsoft/TypeAgent

Public

mirrored fromhttps://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
871e498e266dc8ad2d11a911759ccdb1f48c2f74

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

python/ta/Makefile

78lines · modecode

1# Copyright (c) Microsoft Corporation.
2# Licensed under the MIT License.
3
4# This is Guido's Makefile. Please don't make it complicated.
5
6.PHONY: all
7all: venv format check test build
8
9.PHONY: format
10format: venv
11 .venv/bin/black typeagent test tools
12
13.PHONY: check
14check: venv
15 .venv/bin/pyright --pythonpath .venv/bin/python typeagent test tools
16
17.PHONY: test
18test: venv
19 .venv/bin/python -m coverage run --source=typeagent -m pytest test
20
21.PHONY: demo
22demo: venv
23 .venv/bin/python -m tools.utool $(FLAGS)
24
25.PHONY: compare
26compare: venv
27 .venv/bin/python -m tools.utool --batch $(FLAGS)
28
29.PHONY: mcp
30mcp: venv
31 .venv/bin/mcp dev typeagent/mcp/server.py
32
33.PHONY: profile
34profile: venv
35 </dev/null .venv/bin/python -m cProfile -s ncalls -m test.cmpsearch --interactive --podcast ~/AISystems-Archive/data/knowpro/test/indexes/All_Episodes_index | head -60
36
37.PHONY: scaling
38scaling: venv
39 </dev/null .venv/bin/python -m test.cmpsearch --interactive --podcast ~/AISystems-Archive/data/knowpro/test/indexes/All_Episodes_index
40
41.PHONY: build
42build: venv
43 .venv/bin/python -m build --wheel
44
45.PHONY: venv
46venv: .venv
47
48.venv:
49 @echo "(If 'uv' fails with 'No such file or directory', try 'make install-uv')"
50 uv sync -q
51 @.venv/bin/black --version | sed 's/, / /'
52 @.venv/bin/pyright --version
53 @.venv/bin/pytest --version
54
55install-uv:
56 curl -Ls https://astral.sh/uv/install.sh | sh
57
58.PHONY: clean
59clean:
60 rm -rf build dist venv .venv *.egg-info
61 rm -f *_data.json *_embedding.bin
62 find . -type d -name __pycache__ | xargs rm -rf
63
64.PHONY: help
65help:
66 @echo "Usage: make [target]"
67 @echo "make help # Help (this message)"
68 @echo "make # Same as 'make all'"
69 @echo "make all # venv, format, check, test, build"
70 @echo "make format # Run black"
71 @echo "make check # Run pyright"
72 @echo "make test # Run pytest (tests are in test/)"
73 @echo "make build # Build the wheel (under dist/)"
74 @echo "make demo # python tools/utools.py (interactive)"
75 @echo "make compare # python tools/utools.py --batch"
76 @echo "make venv # Create .venv/"
77 @echo "make clean # Remove build/, dist/, .venv/, *.egg-info/"
78 @echo "make install-uv # Install uv (if not already installed)"
79