microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
285e342fc92f597fd417c23380cd3eb899229f98

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/Makefile

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