Skip to content

Bootstrap uv workflow and initial ty config#746

Merged
Kane610 merged 9 commits intomasterfrom
feat/uv-ruff-ty-bootstrap
Mar 28, 2026
Merged

Bootstrap uv workflow and initial ty config#746
Kane610 merged 9 commits intomasterfrom
feat/uv-ruff-ty-bootstrap

Conversation

@Kane610
Copy link
Copy Markdown
Owner

@Kane610 Kane610 commented Mar 28, 2026

Summary

  • add a starter section in (mypy remains primary)
  • update to prefer with venv/pip fallback
  • document uv-based development commands in , including opt-in check

Notes

  • this introduces ty as a starting point and does not replace mypy
  • no behavioral/library runtime changes

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bootstraps a uv-based developer workflow for the project (while keeping mypy as the primary type checker), adds an initial ty configuration placeholder, and updates local tooling/CI to run checks via uv.

Changes:

  • Add uv.lock and update setup/docs to use uv sync / uv run commands.
  • Switch pre-commit hooks and GitHub Actions workflows to execute Ruff/mypy/pytest via uv.
  • Add an initial [tool.ty] section and document an opt-in ty check.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
uv.lock Introduces a uv lockfile to pin dependency resolution.
setup.sh Moves repo setup to uv sync + uv run pre-commit install.
pyproject.toml Adds a starter [tool.ty] configuration section.
README.md Documents uv-based development setup and commands, including opt-in ty.
.vscode/tasks.json Adds VS Code tasks for syncing and running checks via uv.
.vscode/settings.json Points VS Code’s interpreter at the .venv Python executable.
.pre-commit-config.yaml Replaces remote hooks with local hooks that run tools via uv.
.github/workflows/tests.yml Updates CI test/lint/typecheck steps to use uv.
.github/workflows/pythonpublish.yml Updates publish workflow build/upload steps to use uv run --with ....

setup.sh Outdated
Comment on lines +9 to +15
if ! command -v uv >/dev/null 2>&1; then
echo "uv is required for setup. Install uv from https://docs.astral.sh/uv/"
exit 1
fi

python3 -m pip install ".[requirements, requirements-test, requirements-dev]"
pre-commit install
uv sync --all-extras
uv run pre-commit install
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup.sh hard-fails when uv is missing, but the PR description says the workflow should prefer uv with a venv/pip fallback. Either implement the fallback path here (create venv + pip install + pre-commit install) or update the PR description/docs to reflect that uv is required.

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +17
- id: ruff-check
name: ruff check
entry: uv run --extra requirements-test ruff check --fix
language: system
types_or: [python, pyi]
- id: ruff-format
args:
- --target-version=py313
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
name: ruff format
entry: uv run --extra requirements-test ruff format
language: system
types_or: [python, pyi]
- id: mypy
language_version: python3.14
additional_dependencies: [
"httpx==0.28.1",
"orjson==3.11.5",
"packaging==25.0",
"types-xmltodict==v1.0.1.20260113"
]
exclude: ^tests/
name: mypy
entry: uv run --extra requirements-test mypy axis
language: system
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These local pre-commit hooks invoke uv directly; if uv isn’t installed, developers will get a generic “command not found” failure. Consider adding an explicit uv presence check (with a clearer message) in the hook entry, or ensure the repository docs/setup make uv a hard requirement (matching the PR description).

Copilot uses AI. Check for mistakes.
@Kane610 Kane610 merged commit 05dfd70 into master Mar 28, 2026
1 check passed
@Kane610 Kane610 deleted the feat/uv-ruff-ty-bootstrap branch March 28, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants