microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
cfd0892092d37543a37366a00d9d3eb27469607c

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/Makefile

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