Skip to content

build(test-overhaul-of-docs): Migrate to uv and pyproject.toml#40

Merged
ericapisani merged 1 commit into
mainfrom
PY-2467-test-overhaul-of-docs
May 21, 2026
Merged

build(test-overhaul-of-docs): Migrate to uv and pyproject.toml#40
ericapisani merged 1 commit into
mainfrom
PY-2467-test-overhaul-of-docs

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
  • Remove legacy requirements.txt

Refs PY-2467

🤖 Generated with Claude Code

Replace pip/requirements.txt with uv/pyproject.toml for dependency
management. Update run.sh to use uv run.

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

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2467

Comment on lines +4 to +8
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

# create and activate virtual environment
python -m venv .venv
source .venv/bin/activate

# Install (or update) requirements
python -m pip install -r requirements.txt


# uvicorn main:app --port 8000
# gunicorn main:app
python main.py
# sanic main:app
# flask --app main run

# echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
# echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
# echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

# arq demo.WorkerSettings No newline at end of file
uv run python main.py

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 script installs uv but fails to update the current shell's PATH, causing the subsequent uv command to fail on systems where it wasn't pre-installed.
Severity: HIGH

Suggested Fix

After the uv installation command, source the appropriate environment file to update the PATH for the current session (e.g., source "$HOME/.cargo/env"). Alternatively, invoke uv using its full installation path, such as $HOME/.cargo/bin/uv.

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-overhaul-of-docs/run.sh#L4-L8

Potential issue: The `run.sh` script attempts to install `uv` if it is not found.
However, the installer (`curl -LsSf https://astral.sh/uv/install.sh | sh`) only updates
shell configuration files like `.bashrc` and does not modify the `PATH` of the currently
running script session. Consequently, the subsequent command `uv run python main.py`
fails with a "command not found" error. Because the script uses `set -euo pipefail`,
this error will cause the script to terminate immediately on any clean environment, such
as a CI runner or a new developer setup, that does not have `uv` pre-installed.

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

@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 440d644. Configure here.

# echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

# arq demo.WorkerSettings No newline at end of file
uv run python main.py

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 not on PATH after install

Medium Severity

When uv is missing, run.sh installs it via curl | sh, but the installer runs in a subshell and does not update PATH in the current script. The next uv run line often fails with “command not found” on a first run without uv already installed.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 440d644. Configure here.

@ericapisani ericapisani merged commit 0c80053 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