microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
16d90b832f199d22183c13a142e08bda5070defc

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/Makefile

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