Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
30409ed
Omnibus PR (#1568)
gvanrossum-ms Sep 15, 2025
0725fa1
Improve _prepare_term(); test indexing edge cases (#1599)
gvanrossum-ms Sep 16, 2025
24a34d9
Use 'uv build' to build dist
gvanrossum-ms Sep 17, 2025
2f262e8
Add release-py.yml; rename project to typeagent-py
gvanrossum-ms Sep 17, 2025
40ae431
Add YAML copyright
gvanrossum-ms Sep 17, 2025
f38883d
Fix display url
gvanrossum-ms Sep 17, 2025
dc74f43
Attempt to install typechat and all its subdirs too
gvanrossum-ms Sep 17, 2025
790bae4
Add typechat tree
gvanrossum-ms Sep 17, 2025
241e8f8
Bump version to 0.1.1
gvanrossum-ms Sep 17, 2025
11868ca
Add copyright notices to typechat files (not ideal, since most files …
gvanrossum-ms Sep 17, 2025
6757489
v0.1.2-py
gvanrossum-ms Sep 17, 2025
cc0f6bb
Oh, the irony!
gvanrossum-ms Sep 17, 2025
d74d26c
A simple release script
gvanrossum-ms Sep 17, 2025
9540ec0
Bump version to 0.1.4
gvanrossum-ms Sep 17, 2025
8e714e4
Add readme option for long description
gvanrossum-ms Sep 17, 2025
2416295
Bump version to 0.1.5
gvanrossum-ms Sep 17, 2025
37de45d
Add data file to wheel
gvanrossum-ms Sep 17, 2025
8f4f684
Bump version to 0.1.6
gvanrossum-ms Sep 17, 2025
1fccb0a
Remove typechat from remo -- we'll get it from PyPI
gvanrossum-ms Sep 19, 2025
2805f9f
Remove maintainer info from README.md
gvanrossum-ms Sep 19, 2025
53ce8cb
Bump version to 0.1.7
gvanrossum-ms Sep 19, 2025
d78cc33
TODO for the Oct 18 talk at PyBay
gvanrossum-ms Sep 30, 2025
db03545
Add webvtt-py dependency
gvanrossum-ms Sep 30, 2025
cd4e928
Run black over new tools
gvanrossum-ms Oct 1, 2025
dc8b6ad
Add some sample WebVTT (.vtt) files
gvanrossum-ms Oct 1, 2025
3e41b74
Update typechat to version with .schema_str attribute
gvanrossum-ms Oct 1, 2025
287e8e4
Add speaker information to Confuse-A-Cat.vtt
gvanrossum-ms Oct 1, 2025
cb57ad3
Add WebVTT ingestion. Also fix Podcast ingestion.
gvanrossum-ms Oct 2, 2025
28feb33
Update TADA.md
gvanrossum-ms Oct 2, 2025
b8bd44b
Support multiple voices per cue
gvanrossum-ms Oct 2, 2025
7e0f957
Attempts by Claude to add incremental ingestion. Doesn't work yet.
gvanrossum-ms Oct 3, 2025
1382c7c
Fix ingest_vtt.py: ingest multiple files; show progres
gvanrossum-ms Oct 3, 2025
14c5402
Add message content when typechat returns an error
gvanrossum-ms Oct 4, 2025
8bf47e9
ingest_vtt.py: Add --batchsize; add more verbose messages
gvanrossum-ms Oct 4, 2025
756a7c1
Add GMail extraction script (thanks to GPT-5)
gvanrossum-ms Oct 4, 2025
ef2e7ad
Bump version to 0.1.8
gvanrossum-ms Oct 4, 2025
6fd6118
Ignore 'db' and testdata/MP
gvanrossum-ms Oct 4, 2025
acb824b
Add copyright header to test/test_incremental_index.py
gvanrossum-ms Oct 4, 2025
06e2f0a
Move instructions to AGENTS.md
gvanrossum-ms Oct 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 0 additions & 193 deletions .github/copilot-instructions.md

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/release-py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

name: Release (PyPI via Trusted Publishing + uv)

on:
push:
tags: [ "v*" ] # tag to publish
workflow_dispatch: # manual run

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: python/ta # your project subdir
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Create .venv and install deps
run: uv sync

- name: Build sdist + wheel (via make)
run: make build # runs `uv build`, outputs to dist/

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: python/ta/dist/

publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/typeagent-py
permissions:
id-token: write # REQUIRED for Trusted Publishing (no tokens!)
contents: read
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# For TestPyPI first, add:
# with:
# repository-url: https://test.pypi.org/legacy/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ venv
/evals
/junk
__pycache__
testdata/MP/
db
102 changes: 102 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
applyTo: '**/*.py'
---

**DO NOT BE OBSEQUIOUS**

# For Agent mode

**NEVER use TEST_MODEL_NAME or "test" embedding model outside of test files**

Never run git commands that many any changes. (`git status` and `git diff` are fine)

**NEVER COMMIT CODE. Do not run `git commit` or any other git commands that make changes to the repository. Not even `git add`**

When moving, copying or deleting files, use the git commands: `git mv`, `git cp`, `git rm`

When the working directory is ~/TypeAgent/python/ta/:

- Don't use '!' on the command line, it's some bash magic (even inside single quotes)
- Activate `.venv`: make venv; source .venv/bin/activate
- To get API keys in ad-hoc code, run `typeagent.aitools.utils.load_dotenv()`
- Use pytest to run tests in test/
- Use pyright to check type annotations in tools/, test/, typeagent/
- Ignore build/, dist/
- You can also use the pylance extension for type checking in VS Code
- Use `make check` to type-check all files
- Use `make test` to run all tests
- Use `make check test` to run `make check` and if it passes also run `make test`

## Package Management with uv

- Use `uv add <package>` to add new dependencies
- Use `uv add <package> --upgrade` to upgrade existing packages
- **Important**: uv automatically updates `pyproject.toml` when adding/upgrading packages
- **Do NOT** manually edit `pyproject.toml` dependency versions after running uv commands
- uv maintains consistency between `pyproject.toml`, `uv.lock`, and installed packages
- Trust uv's automatic version resolution and file management

**IMPORTANT! YOU ARE NOT DONE UNTIL `make check test format` PASSES**

# Code generation

When generating Python code (e.g. when translating TypeScript to Python),
please follow these guidelines:

* When creating a new file, add a copyright header to the top:
```
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
```

* Assume Python 3.12

* Always strip trailing spaces

* Keep class and type names in `PascalCase`
* Use `python_case` for variable/field and function/method names

* Use `Literal` for unions of string literals
* Keep union notation (`X | Y`) for other unions
* Use `Protocol` for interfaces whose name starts with `I`
followed by a capital letter
* Use `dataclass` for other classes and structured types
* Use `type` for type aliases (`PascalCase` again)
* Use `list`, `tuple`, `dict`, `set` etc., not `List` etc.

* Translate `foo?: string` to `foo: str | None = None`

* When writing tests:
- don't mock; use the regular implementation (maybe introduce a fixture to create it)
- assume `pytest`; use `assert` statements
- match the type annotations of the tested functions
- read the code of the tested functions to understand their behavior
- When using fixtures:
- Fully type-annotate the fixture definitions (including return type)
- Fully type-annotate fixture usages

* Don't put imports inside functions.
Put them at the top of the file with the other imports.
Exception: imports in a `if __name__ == "__main__":` block or a `main()` function.
Another exception: pydantic and logfire.
Final exception: to avoid circular import errors.

* **Import Architecture Rules**:
- **Never import a symbol from a module that just re-exports it**
- **Always import directly from the module that defines the symbol**
- **Exception**: Package `__init__.py` files that explicitly re-export with `__all__`
- **Exception**: Explicit re-export patterns like `from ... import X as X` or marked with "# For export"
- This prevents circular imports and makes dependencies clear

* Order imports alphabetically after lowercasing; group them as follows
(with a blank line between groups):
1. standard library imports
2. established third-party libraries
3. experimental third-party libraries (e.g. `typechat`)
4. local imports (e.g. `from typeagent.knowpro import ...`)

* **Error Handling**: Don't use `try/except Exception` to catch errors broadly.
Let errors bubble up naturally for proper error handling and debugging at higher levels.

* **Code Validation**: Don't use `py_compile` for syntax checking.
Use `pyright` or `make check` instead for proper type checking and validation.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ scaling: venv

.PHONY: build
build: venv
.venv/bin/python -m build --wheel
uv build

.PHONY: venv
venv: .venv
Expand Down
Loading