microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ff543d809bb77043be015c9ee5a2f78159eb3d7d

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/Makefile

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