Skip to content

reuse virtual envs #131

Merged
OwenPriceSkelly merged 3 commits intomainfrom
owen/reuse-envs
Feb 24, 2026
Merged

reuse virtual envs #131
OwenPriceSkelly merged 3 commits intomainfrom
owen/reuse-envs

Conversation

@OwenPriceSkelly
Copy link
Member

closes #127

In terms of outward-facing changes this is just a pretty straightforward performance enhancement, but internally it's a little more significant. In order to re-use virtual environments, we needed to refactor the shell script template from a nice implicit uv run to explicitly building an environment with uv venv + uv pip install to run the script. The upshot of this is that uv isn't actually parsing any of the PEP723 metadata itself anymore -- the resolution logic is equivalent for a fresh script, but groundhog is now the only tool reading the metadata, and so is responsible for faithfully passing the metadata (e.g. exclude-newer) along to uv.

This means we no longer directly invoke `uv run` on a script with PEP
723 metadata; instead we use `uv venv` and `uv pip install` before
calling python directly
@OwenPriceSkelly OwenPriceSkelly merged commit 042b124 into main Feb 24, 2026
2 checks passed
@OwenPriceSkelly OwenPriceSkelly deleted the owen/reuse-envs branch February 24, 2026 21:06
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.

reuse env if present

1 participant