microsoft/TypeAgent

Public

mirrored from https://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2e67fb95cd53d44a12d79b67eefb6b0633ecaf30

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/Makefile

68lines · 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
12
13.PHONY: check
14check: venv
15 .venv/bin/pyright --pythonpath .venv/bin/python typeagent test
16
17.PHONY: test
18test: venv
19 .venv/bin/python -m pytest test
20
21.PHONY: demo
22demo: venv
23 .venv/bin/python -m typeagent.demo
24
25.PHONY: eval
26eval: venv
27 .venv/bin/python -m test.cmpsearch
28
29.PHONY: profile
30profile: venv
31 </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
32
33.PHONY: build
34build: venv
35 .venv/bin/python -m build --wheel
36
37.PHONY: venv
38venv: .venv
39
40.venv:
41 @echo "(If 'uv' fails with 'No such file or directory', try 'make install-uv')"
42 uv sync -q
43 @.venv/bin/black --version | sed 's/, / /'
44 @.venv/bin/pyright --version
45 @.venv/bin/pytest --version
46
47install-uv:
48 curl -Ls https://astral.sh/uv/install.sh | sh
49
50.PHONY: clean
51clean:
52 rm -rf build dist venv .venv *.egg-info
53 rm -f *_data.json *_embedding.bin
54 find . -type d -name __pycache__ | xargs rm -rf
55
56.PHONY: help
57help:
58 @echo "Usage: make [target]"
59 @echo "make help # Help (this message)"
60 @echo "make # Same as 'make all'"
61 @echo "make all # venv, format, check, test, build"
62 @echo "make format # Run black"
63 @echo "make check # Run pyright"
64 @echo "make test # Run pytest (tests are in test/)"
65 @echo "make build # Build the wheel (under dist/)"
66 @echo "make venv # Create .venv/"
67 @echo "make clean # Remove build/, dist/, .venv/, *.egg-info/"
68 @echo "make install-uv # Install uv (if not already installed)"
69