Skip to content

Commit

Permalink
Support custom venv directory
Browse files Browse the repository at this point in the history
When using CI, we want to use a fresh venv for every build so bad venv
created by one job does not break the next job, or bad change in a PR is
not hidden by good venv created by a previous job.

When using local development, you may want to have venv per ramen source
directory. One case is using git worktree to have multiple ramen trees.
With this change you can create a venv per ramen worktree.

Example usage:

    hack/make-venv .venv/ramen

Since this is the expected usage, add this path to gitignore, so using
`git clean dxf` does not remove the directory.

Signed-off-by: Nir Soffer <[email protected]>
  • Loading branch information
nirs authored and raghavendra-talur committed Dec 5, 2024
1 parent 98b40db commit bf79da5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ config/hub/bundle
.zed

# Generated files
.venv
venv

# Test enviromemnt generated files
Expand Down
2 changes: 1 addition & 1 deletion hack/make-venv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

venv=~/.venv/ramen
venv=${1:-~/.venv/ramen}

if [ -d "$venv" ]; then
echo "Virtual environemnt exists: '$venv'"
Expand Down

0 comments on commit bf79da5

Please sign in to comment.