Use uv for venv creation in lc init (with python fallback)#125
Merged
Conversation
Prefer uv (faster installs, pinned Python 3.12) when available on the system; fall back to the stdlib venv + pip path otherwise. Rich status spinners give feedback during both steps. Tests cover both branches by monkeypatching shutil.which and subprocess.run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
lightcone-cli | 1d44859 | Commit Preview URL Branch Preview URL |
May 08 2026, 09:17 AM |
Member
|
This looks good @aboucaud ! One question, does this modify the principle of having the venv in .venv? We curretrnyl have a hook that sources the .venv when claude starts. I think this doesn't change things, but just want to check |
Member
Author
|
No it is transparent |
Developer Certificate of Origin✅ All contributors have signed the DCO. This PR is ready to merge. Status |
Member
Author
|
I have read the Developer Certificate of Origin and I hereby sign the DCO for this PR |
✅ Eval Results
Graders✅ spec_valid (1.00) Full output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python -m venv+pip installwithuv venv --python 3.12+uv pip installinlc initfor faster environment setupvenv+pippath whenuvis not available on the systemCloses #102
Test plan
test_init_venv_uses_uv_when_available— verifiesuv venv --python 3.12anduv pip installare called whenuvis on PATHtest_init_venv_falls_back_to_python_when_uv_missing— verifiespython -m venv/pip installfallback whenuvis absent🤖 Generated with Claude Code
Signed-off-by: Alexandre Boucaud aboucaud@apc.in2p3.fr