Skip to content

build(test-clickhouse-driver): Migrate to uv and pyproject.toml#10

Merged
ericapisani merged 1 commit into
mainfrom
PY-2438-test-clickhouse-driver
May 21, 2026
Merged

build(test-clickhouse-driver): Migrate to uv and pyproject.toml#10
ericapisani merged 1 commit into
mainfrom
PY-2438-test-clickhouse-driver

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-2438

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-2438
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2438

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


python main.py 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 doesn't update the PATH for the current shell session, causing the subsequent uv run command to fail.
Severity: HIGH

Suggested Fix

After installing uv, update the PATH for the current session before uv is called. For example, add export PATH="$HOME/.local/bin:$PATH" to the script. This ensures the uv binary is found and executed within the same script run.

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-clickhouse-driver/run.sh#L4-L8

Potential issue: The script installs the `uv` package if it is not found. However, the
installer adds the `uv` binary to a directory like `~/.local/bin` and updates shell
profile files for future sessions, but it does not modify the `PATH` of the current
running shell. Consequently, the subsequent command `uv run python main.py` will fail
with a 'command not found' error in any environment where `uv` was not previously
installed and in the `PATH`, such as a clean CI or Docker container.

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

@ericapisani ericapisani merged commit 3b0aa3a 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