Bh/make uv use global venv instead of creating project one #1482
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.
🐛 Bug-fix PR
Before opening this PR please:
make lint- passesruff,mypy,pylintmake test- all unit + integration tests greenmake coverage- ≥ 90 %make docker docker-run-sslormake podman podman-run-ssl📌 Summary
This fixes #1461 - an issue with having the virtual environment(s) split between a global virtual env and a project virtual env.
This change encourages uv to use the global venv instead of accidentally creating a project based one (which it does by default).
🔁 Reproduction Steps
Bug: #1461
Steps to reproduce:
make venvmake pylintNote: warning and creation of .venv directory in the project area
5. run
pylintNote despite having run with make, the tool is not available directly. I'd expect tools to be available in my virtual environment after successful execution of make target.
🐞 Root Cause
Inconsistent virtual environment definition means activating the wrong one stops normal function of project make tasks.
💡 Fix Description
I've updated the
uv runtasks to use the active virtual environment instead of uv's default action to ignore the active one in favour of a local ".venv" directory.I've confirmed the other
uvbased tasks are not affected, it only seems to be theuv runcommands that cause this issue.Now steps end up with:
Steps to reproduce:
make venvmake pylintNote: No warning message
5. run
pylintNote despite having run with make, the tool is not available directly. I'd expect tools to be available in my virtual environment after successful execution of make target.
6. run
ls .venv🧪 Verification
make lintmake testmake coverage📐 MCP Compliance (if relevant)
✅ Checklist
make black isort pre-commit)