Bump Python Version and Adopt UV | Generated by AI
Here’s a summary of everything changed:
Files modified:
- pyproject.toml
- requires-python: “>=3.8” -> “>=3.9” (google-genai needs 3.9+, uv enforces this strictly)
- pyright pythonVersion: “3.8” -> “3.9” (match)
- README.md
- Added uv as recommended install method (uv sync)
- Kept pip install -e . as fallback
- README-CN.md
- Same uv addition in Chinese
- .github/workflows/unit_test.yml
- Replaced actions/setup-python + pip with astral-sh/setup-uv + uv sync
- All test commands use uv run python …
- .github/workflows/integration_test.yml
- Same uv migration, removed extra pip install PyJWT numpy Pillow (now in lockfile)
- uv.lock (new)
- Generated by uv lock, committed for reproducible installs
How it works now:
# Fresh clone + install uv sync # creates .venv, installs deps from lockfile uv run ww note # run any command via uv
# Or install globally as a tool uv tool install -e .
# pip still works as before pip install -e .
Key notes:
- uv sync respects the existing .venv/ if present, or creates a new one
- uv lock pins all transitive deps for reproducible installs across machines/CI
- CI now uses astral-sh/setup-uv which caches deps automatically — much faster than pip
- The requires-python bump from 3.8 to 3.9 is a no-op in practice (google-genai already required it, uv just enforces it now)