microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
88322a0b3f0c311a95730d3faeab445ada3988b2

Branches

Tags

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

Clone

HTTPS

Download ZIP

python/ta/make.bat

70lines · modecode

1:: Copyright (c) Microsoft Corporation.
2:: Licensed under the MIT License.
3
4@echo off
5if "%~1"=="" goto help
6
7if /I "%~1"=="help" goto help
8if /I "%~1"=="venv" goto venv
9if /I "%~1"=="check" goto check
10if /I "%~1"=="test" goto test
11if /I "%~1"=="demo" goto demo
12if /I "%~1"=="clean" goto clean
13if /I "%~1"=="format" goto format
14if /I "%~1"=="build" goto build
15
16echo Unknown command: %~1
17goto help
18
19:format
20if not exist "venv\" call make.bat venv
21echo Formatting code...
22venv\Scripts\black typeagent *.py
23goto end
24
25:check
26if not exist "venv\" call make.bat venv
27echo Running checks...
28venv\Scripts\pyright --pythonpath venv\Scripts\python typeagent *.py
29goto end
30
31:test
32if not exist "venv\" call make.bat venv
33echo Running tests...
34venv\Scripts\python -m typeagent.podcasts testdata\npr.txt
35goto end
36
37:demo
38if not exist "venv\" call make.bat venv
39echo Running demo...
40venv\Scripts\python demo.py
41goto end
42
43:build
44if not exist "venv\" call make.bat venv
45echo Building package...
46venv\Scripts\python -m build --wheel
47goto end
48
49:venv
50echo Creating virtual environment...
51python3.12 -m venv venv
52venv\Scripts\pip -q install -r requirements.txt
53venv\Scripts\python --version
54venv\Scripts\pyright --version
55venv\Scripts\black --version
56
57goto end
58
59:clean
60echo Sorry, you have to clean up manually.
61echo These are to be deleted: build dist *.egg-info venv
62echo Delete venv if the requirements have changed.
63echo The others are products of the build step.
64goto end
65
66:help
67echo Usage: make.bat [format^|check^|test^|demo^|build^|venv^|clean^|help]
68goto end
69
70:end
71