Skip to content

Honor uv-managed project venvs in setup and check#900

Merged
codeforester merged 1 commit into
masterfrom
bug/896-20260619-uv-venv-gate
Jun 20, 2026
Merged

Honor uv-managed project venvs in setup and check#900
codeforester merged 1 commit into
masterfrom
bug/896-20260619-uv-venv-gate

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

  • Make uv-managed projects bypass the historical ~/.base.d/<project>/.venv setup/check gate.
  • Run uv-managed project setup/check through Base's own Python runtime while exposing <project-root>/.venv as BASE_PROJECT_VENV_DIR.
  • Add BASE-P154 to report missing or ready uv project virtualenvs with uv sync guidance.

Root Cause

setup_common.sh still required the legacy Base-managed project venv before invoking the Python project layer, even for manifests that explicitly declare python.manager: uv.

Validation

  • BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash bats cli/bash/commands/basectl/tests/check.bats cli/bash/commands/basectl/tests/setup.bats cli/bash/commands/basectl/tests/project-command-helpers.bats
  • PYTHONPATH=lib/python:cli/python /Users/rameshhp/.base.d/base/.venv/bin/python -m pytest cli/python/base_setup/tests/test_uv.py -q
  • PYTHONPATH=lib/python:cli/python /Users/rameshhp/.base.d/base/.venv/bin/python -m pytest cli/python/base_setup/tests/test_command_lint.py cli/python/base_setup/tests/test_pyproject.py -q
  • git diff --check
  • env -u BASE_HOME BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash ./bin/base-test

Smoke

  • basectl setup base-uv-smoke --manifest /private/tmp/base-uv-smoke/base_manifest.yaml --dry-run shows uv sync and does not create ~/.base.d/base-uv-smoke/.venv.
  • basectl check base-uv-smoke --manifest /private/tmp/base-uv-smoke/base_manifest.yaml --format json reaches uv diagnostics and reports BASE-P154 with uv sync guidance. The command used a fake writable HOME, so the base prerequisite layer also reported a Homebrew Python formula error unrelated to the uv project check.

Demo Impact

  • None.

Fixes #896

@codeforester codeforester marked this pull request as ready for review June 20, 2026 16:40
@codeforester codeforester requested a review from a team as a code owner June 20, 2026 16:40
@codeforester codeforester merged commit 9c17634 into master Jun 20, 2026
18 checks passed
@codeforester codeforester deleted the bug/896-20260619-uv-venv-gate branch June 20, 2026 16:41
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.

Honor uv-managed project venvs in setup and check

1 participant