microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
769e56e3cf9bc20d8cef4441a43759b22892d7cc

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/Makefile

49lines · 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
12
13.PHONY: check
14check: venv
15 venv/bin/pyright --pythonpath venv/bin/python typeagent
16
17.PHONY: test
18test: venv
19 venv/bin/python -m typeagent.podcasts testdata/npr.txt
20
21.PHONY: build
22build: venv
23 venv/bin/python -m build --wheel
24
25# Not phony -- the venv directory is the product of this rule.
26venv:
27 python3 -m venv venv || (rm -rf venv && exit 1)
28 venv/bin/pip -q install -r requirements.txt
29 @venv/bin/python --version
30 @venv/bin/pyright --version
31 @venv/bin/black --version
32
33.PHONY: clean
34clean:
35 rm -rf build dist venv *.egg-info
36 find . -type d -name __pycache__ | xargs rm -rf
37
38.PHONY: help
39help:
40 @echo "Usage: make [target]"
41 @echo "make help # Help (this message)"
42 @echo "make # Same as 'make all'"
43 @echo "make all # venv, format, check, test, build"
44 @echo "make format # Run black"
45 @echo "make check # Run pyright"
46 @echo "make test # Run import_podcast test"
47 @echo "make build # Build the wheel (under dist/)"
48 @echo "make venv # Create venv/"
49 @echo "make clean # Remove build/, dist/, venv/, *.egg-info/"
50