Repository navigation
chore: migrate dependency management to uv - #2509
Conversation
PR Summary by QodoMigrate dependency management to uv (lockfile + Docker uv sync)
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1. pyproject.toml commented-out dependencies
|
ab0c3f4 to
3e0e390
Compare
- Inline requirements.txt into [project.dependencies] and requirements-dev.txt into [dependency-groups].dev (exact pins and environment markers preserved). Move test tooling (pytest, pytest-asyncio, pytest-cov) to the dev group where it belongs, and drop dead dev deps (poetry, twine). - Optional features become PEP 621 extras: `lambda` (mangum), `similar-issue` (pinecone/lancedb/qdrant; git source declared via [tool.uv.sources] so it stays out of published metadata), and `langchain` (bumped to versions compatible with the current openai/ litellm; the old pins were unsatisfiable). - Drop dynamic dependencies, the requirements*.txt files, and the legacy setup.py shim; add uv.lock and .python-version. The setuptools build backend is retained (verified the built wheel still ships all pr_agent/settings/*.toml data files). - Dockerfiles install from the lockfile with `uv sync --frozen`: service images use /app/.venv on PATH, the lambda image uses /opt/venv exposed via PYTHONPATH, and the test target syncs the dev group. - Update contributor docs to uv (`uv sync`, `uv run pr-agent ...`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADg72cCmirPo9W3E74Htyk
3e0e390 to
cccdd8d
Compare
|
Code review by qodo was updated up to the latest commit cccdd8d |
|
This is the missing half of the #2523 deadlock. @antoniotechio wants relaxed pins so consumers can pull security patches; @naorpeled objects on reproducibility grounds. A committed lockfile gives reproducibility independently of the declared ranges, which is what makes relaxing them safe — so this arguably wants deciding before #2523, not after. As it stands it keeps the pins verbatim ( Also stale: it pins @shmulc8 — still live? |
Resolves conflicts from the uv migration: - requirements.txt / requirements-dev.txt: deleted (migrated to pyproject.toml); ported main's pin bumps (aiohttp 3.14.3, boto3 1.43.78, dynaconf 3.2.13, fastapi 0.141.1, GitPython 3.1.59, litellm 1.98.0, PyJWT 2.13.0, ujson 5.13.0, pytest 9.0.3) and new pins (starlette, unidiff, pydantic-settings) into [project.dependencies] / dev group - Dockerfiles: python:3.12.14-slim base + uv layer - CONTRIBUTING.md: uv install steps + main's pyproject wording
Code Review by Qodo
1.
|
…tyle - Move the 'similar-issue' dependencies from a published extra to a PEP 735 dependency group: pinecone-datasets resolves from a git fork that wheel metadata cannot reference, so 'pip install pr-agent[similar-issue]' would silently install the wrong distribution. Dependency groups stay out of published metadata, which also lets the direct git reference replace [tool.uv.sources]. Install with: uv sync --group similar-issue - Rephrase the Dockerfile.lambda environment comment imperatively per the repo comment-style rule
Adopt main's consolidation of agent guidance into AGENTS.md (CLAUDE.md now imports it) and update two statements written for the pip layout: - Flake8 now comes from the pyproject dev dependency group, not requirements-dev.txt - the uv Docker test image keeps pyproject.toml at /app, so CI inherits the pytest settings instead of losing them
|
Code review by qodo was updated up to the latest commit 77233a5 |
Resolve the requirements.txt modify/delete by accepting its deletion in #2509's uv migration. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C1F7BmLnLhSrkpo3QJsehP

What
Migrates the project from a
pip+requirements*.txtlayout to a modern uv project with a committed lockfile, following current best practices.Dependencies & packaging
requirements.txt→[project.dependencies],requirements-dev.txt→[dependency-groups].dev(PEP 735), with exact pins and environment markers preserved (e.g. the per-Pythongoogle-cloud-storagepins).pytest,pytest-asyncio,pytest-cov) moved out of runtime deps into the dev group where it belongs; dropped dead dev deps (poetry,twine).lambda(mangum),similar-issue(pinecone/lancedb/qdrant — git source declared via[tool.uv.sources]so it stays out of published wheel metadata), andlangchain(bumped to versions compatible with the currentopenai/litellm; the old pins were unsatisfiable).dynamicdependencies, bothrequirements*.txt, and the legacysetup.pyshim. Addeduv.lockand.python-version(3.12).pr_agent/settings/*.tomldata files). Verified the built wheel still contains all 21 settings TOMLs, sopython -m build/ PyPI publishing andpip install pr-agentkeep working.Docker — install from the lockfile with
uv sync --frozen(nouv pip install):docker/Dockerfile,Dockerfile.github_action): deps into/app/.venv,.venv/binonPATH, source via the existingPYTHONPATH=/app(shared-base layer caching preserved).docker/Dockerfile.lambda): synced into/opt/venvwith--extra lambda, exposed viaPYTHONPATH.testtarget syncs the dev group.Docs — updated to uv (
uv sync,uv run pr-agent ...) inAGENTS.md,CONTRIBUTING.md,CLAUDE.md, and the local install guide.Verification
uv sync+PYTHONPATH=. uv run pytest tests/unittest→ 1245 passed, 1 skipped, 1 xfailed.langchainextra resolves (langchain-openai 1.3.3w/openai 2.44.0) and the handler module imports cleanly under the bumped versions.--target test→pytest --covruns;--target cli→pr_agent+ runtime deps import from the.venv.uv buildwheel contains allpr_agent/settings/*.tomldata files.Notes
/opt/venv+PYTHONPATHwiring is correct by construction but worth a CI build before merge.ruff(droppingflake8), kept separate to keep this a focused dependency/build change.🤖 Generated with Claude Code