Skip to content

build: migrate to uv, add ruff/ty, format all files#95

Open
FIrgolitsch wants to merge 1 commit intomainfrom
pr-a-build-tooling
Open

build: migrate to uv, add ruff/ty, format all files#95
FIrgolitsch wants to merge 1 commit intomainfrom
pr-a-build-tooling

Conversation

@FIrgolitsch
Copy link
Copy Markdown
Contributor

PR A — Build Tooling & Formatting

Migrates the project build system to modern Python tooling and applies consistent formatting across the entire codebase.

Changes

Build system migration (setup.py → uv + pyproject.toml)

  • Full pyproject.toml with project metadata, dependencies, optional GPU deps, script entries for all existing scripts
  • uv.lock for reproducible dependency resolution
  • Delete setup.py, requirements.txt, requirements-pytest.txt

Linting & formatting (ruff + ty)

  • [tool.ruff] config: target py312, line-length 127, select E/F/W/I/UP/B/RUF/SIM/C4/PIE/PTH
  • [tool.ruff.lint.isort] with _thread_config section ordering
  • [tool.ty] config: linumpy-only, py312, cupy/cupyx/numba → Any, relaxed overrides for tests and GPU modules
  • .pre-commit-config.yaml: ruff-format, ruff lint (--fix), ty (advisory/non-blocking)
  • ruff format applied to all 122 Python files
  • ruff check --fix applied (341 auto-fixes: import sorting, f-strings, type upgrades, etc.)

CI & Docker

  • .github/workflows/python-app.yml updated: astral-sh/setup-uv@v5, uv sync, uv run ruff, uv run ty, uv run pytest
  • Dockerfile updated for uv (replaces pip install)

Other

  • linumpy/py.typed marker file
  • [dependency-groups] dev: ruff, ty, pytest, pytest-cov, pytest-console-scripts, pre-commit

Notes

  • 323 pre-existing lint warnings remain (PTH, SIM, E501, etc.) — to be addressed in future PRs
  • Script entries in [project.scripts] limited to scripts currently on main; later PRs will add their own entries
  • This PR is a prerequisite for all subsequent feature PRs in the split plan

- Replace setup.py + requirements.txt with pyproject.toml (uv)
- Add .pre-commit-config.yaml (ruff-format, ruff lint, ty advisory)
- Update CI workflow to use uv + ruff + ty
- Update Dockerfile for uv
- Add uv.lock, linumpy/py.typed
- Delete setup.py, requirements.txt, requirements-pytest.txt
- Run ruff format on all Python files
- Run ruff check --fix (341 auto-fixes applied)
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.

1 participant