microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
5ebdcc1978d7afba1430e07b4fb025b5056f74f3

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/Makefile

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