Skip to content

build(test-error-sampler): Migrate to uv and pyproject.toml#20

Merged
ericapisani merged 1 commit into
mainfrom
PY-2447-test-error-sampler
May 21, 2026
Merged

build(test-error-sampler): Migrate to uv and pyproject.toml#20
ericapisani merged 1 commit into
mainfrom
PY-2447-test-error-sampler

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Summary

  • Replace pip/requirements.txt with uv/pyproject.toml for dependency management
  • Update run.sh to use uv run instead of manual venv creation and pip install
  • Remove legacy requirements.txt

Refs PY-2447

Test plan

  • Verify pyproject.toml includes all dependencies from the original requirements.txt
  • Verify run.sh uses uv run
  • Verify requirements.txt is removed

🤖 Generated with Claude Code

Replace pip/requirements.txt with uv/pyproject.toml for dependency
management. Update run.sh to use uv run instead of manual venv
creation and pip install.

Refs PY-2447
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2447

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ed198d3. Configure here.

Comment thread test-error-sampler/run.sh
python -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Uv missing PATH after install

Medium Severity

When uv is not already installed, run.sh runs the Astral installer and then immediately invokes uv run. The installer only updates shell startup files for future sessions, so uv is often not on PATH in the current bash process and the script exits before main.py runs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ed198d3. Configure here.

[project]
name = "test-error-sampler"
version = "0"
requires-python = ">=3.12"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The requires-python constraint in pyproject.toml (>=3.12) conflicts with the version in .python-version (3.10.4), which will cause uv to fail.
Severity: HIGH

Suggested Fix

Align the Python versions. Either update the .python-version file to a version that satisfies >=3.12 (e.g., 3.12), or adjust the requires-python constraint in pyproject.toml to be compatible with 3.10.4 (e.g., >=3.10.4).

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: test-error-sampler/pyproject.toml#L4

Potential issue: The newly added `pyproject.toml` file specifies `requires-python =
">=3.12"`. However, the existing `.python-version` file in the same directory pins the
Python version to `3.10.4`. When `uv` is used to run the project, it prioritizes the
`.python-version` file for interpreter selection but then validates it against the
`requires-python` constraint. Since version `3.10.4` does not meet the `>=3.12`
requirement, `uv` will report an incompatibility error, causing the `run.sh` script to
fail.

Did we get this right? 👍 / 👎 to inform future reviews.

@ericapisani ericapisani merged commit 8a7a320 into main May 21, 2026
11 checks passed
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