Skip to content

build(test-js-python-redis-celery): Migrate to uv and pyproject.toml#31

Merged
ericapisani merged 1 commit into
mainfrom
PY-2458-test-js-python-redis-celery
May 21, 2026
Merged

build(test-js-python-redis-celery): Migrate to uv and pyproject.toml#31
ericapisani merged 1 commit into
mainfrom
PY-2458-test-js-python-redis-celery

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Summary

  • Replace pip/requirements.txt with uv/pyproject.toml for dependency management
  • Update run.sh, run-celery.sh, and run-webserver.sh to use uv run
  • Remove legacy requirements.txt

Refs PY-2458

Test plan

  • Verify pyproject.toml includes all dependencies from the original requirements.txt
  • Verify shell scripts use uv run
  • Verify requirements.txt is removed

🤖 Generated with Claude Code

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

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

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2458

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
pip install -r requirements.txt

# Run FastAPI application on localhost:8000
uvicorn main:app --reload
uv run uvicorn main:app --reload

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 doesn't update the PATH in the current session, causing the subsequent uv run command to fail with "command not found".
Severity: HIGH

Suggested Fix

After the uv installation command, add export PATH="$HOME/.local/bin:$PATH" or source "$HOME/.local/bin/env" to make the uv binary available in the current shell session's PATH.

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-js-python-redis-celery/run.sh#L4-L8

Potential issue: The script installs `uv` using its `install.sh` script if it is not
already present. However, this installer only modifies shell configuration files and
does not update the `PATH` for the current shell session. Because the script is run with
`set -euo pipefail`, the immediate subsequent call to `uv run ...` fails with a "command
not found" error, causing the script to exit prematurely. This issue affects `run.sh`,
`run-celery.sh`, and `run-webserver.sh`.

Also affects:

  • test-js-python-redis-celery/run-celery.sh
  • test-js-python-redis-celery/run-webserver.sh

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

@ericapisani ericapisani merged commit 442af00 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