Skip to content

Commit f6a4a8f

Browse files
[python/knowpro] Replace ui.py and cmpsearch.py with unified tools/utool.py (#1354)
- The new tool is `tools/utool.py`, can be invoked via `make demo` (interactive) or `make compare` (batch). - Got rid of `typeagent/demo/` completely. - Got rid of `test/cmpsearch.py`. - Moved `test/vizcmp.py` to `tools/` folder. It can read old and new eval files. - Changed default embedding name from `ada-002` to `text-embedding-ada-002` to work with OPENAI as well. - Fixed some generics silliness with PodcastMessage.
1 parent d7b57c7 commit f6a4a8f

File tree

9 files changed

+802
-942
lines changed

9 files changed

+802
-942
lines changed

python/ta/Makefile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ all: venv format check test build
88

99
.PHONY: format
1010
format: venv
11-
.venv/bin/black typeagent test
11+
.venv/bin/black typeagent test tools
1212

1313
.PHONY: check
1414
check: venv
15-
.venv/bin/pyright --pythonpath .venv/bin/python typeagent test
15+
.venv/bin/pyright --pythonpath .venv/bin/python typeagent test tools
1616

1717
.PHONY: test
1818
test: venv
1919
.venv/bin/python -m coverage run --source=typeagent -m pytest test
2020

2121
.PHONY: demo
2222
demo: venv
23-
.venv/bin/python -m typeagent.demo
23+
.venv/bin/python -m tools.utool $(FLAGS)
2424

2525
.PHONY: compare
2626
compare: venv
27-
.venv/bin/python -m test.cmpsearch
27+
.venv/bin/python -m tools.utool --batch $(FLAGS)
2828

2929
.PHONY: profile
3030
profile: venv
@@ -60,13 +60,15 @@ clean:
6060
.PHONY: help
6161
help:
6262
@echo "Usage: make [target]"
63-
@echo "make help # Help (this message)"
64-
@echo "make # Same as 'make all'"
65-
@echo "make all # venv, format, check, test, build"
66-
@echo "make format # Run black"
67-
@echo "make check # Run pyright"
68-
@echo "make test # Run pytest (tests are in test/)"
69-
@echo "make build # Build the wheel (under dist/)"
70-
@echo "make venv # Create .venv/"
71-
@echo "make clean # Remove build/, dist/, .venv/, *.egg-info/"
63+
@echo "make help # Help (this message)"
64+
@echo "make # Same as 'make all'"
65+
@echo "make all # venv, format, check, test, build"
66+
@echo "make demo # python tools/utools.py (interactive)"
67+
@echo "make compare # python tools/utools.py --batch"
68+
@echo "make format # Run black"
69+
@echo "make check # Run pyright"
70+
@echo "make test # Run pytest (tests are in test/)"
71+
@echo "make build # Build the wheel (under dist/)"
72+
@echo "make venv # Create .venv/"
73+
@echo "make clean # Remove build/, dist/, .venv/, *.egg-info/"
7274
@echo "make install-uv # Install uv (if not already installed)"

python/ta/make.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ goto end
4444
:demo
4545
if not exist ".venv\" call make.bat venv
4646
echo Running demo...
47-
.venv\Scripts\python -m typeagent.demo
47+
.venv\Scripts\python -m tools.utool
4848
goto end
4949

5050
:build

0 commit comments

Comments
 (0)