From cce6b3eb380f8a61d364b840e9910b43d1150019 Mon Sep 17 00:00:00 2001 From: Brian Hussey Date: Wed, 19 Nov 2025 16:57:14 +0000 Subject: [PATCH 1/4] Update uv commands to use the global venv instead of using a second venv in the project dir based and global venv directory Signed-off-by: Brian Hussey --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f6b279601..1abd5d463 100644 --- a/Makefile +++ b/Makefile @@ -443,7 +443,7 @@ test: @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ export DATABASE_URL='sqlite:///:memory:' && \ export TEST_DATABASE_URL='sqlite:///:memory:' && \ - uv run pytest -n auto --maxfail=0 -v --ignore=tests/fuzz" + uv run --active pytest -n auto --maxfail=0 -v --ignore=tests/fuzz" test-profile: @echo "๐Ÿงช Running tests with profiling (showing slowest tests)..." @@ -451,7 +451,7 @@ test-profile: @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ export DATABASE_URL='sqlite:///:memory:' && \ export TEST_DATABASE_URL='sqlite:///:memory:' && \ - uv run pytest -n auto --durations=20 --durations-min=1.0 --disable-warnings -v --ignore=tests/fuzz" + uv run --active pytest -n auto --durations=20 --durations-min=1.0 --disable-warnings -v --ignore=tests/fuzz" coverage: @test -d "$(VENV_DIR)" || $(MAKE) venv @@ -1027,7 +1027,7 @@ flake8: ## ๐Ÿ flake8 checks pylint: uv ## ๐Ÿ› pylint checks @echo "๐Ÿ› pylint $(TARGET) (parallel)..." - uv run pylint -j 0 --fail-on E --fail-under 10 $(TARGET) + uv run --active pylint -j 0 --fail-on E --fail-under 10 $(TARGET) markdownlint: ## ๐Ÿ“– Markdown linting @# Install markdownlint-cli2 if not present @@ -1073,7 +1073,7 @@ pycodestyle: ## ๐Ÿ“ Simple PEP-8 checker pre-commit: uv ## ๐Ÿช„ Run pre-commit tool @echo "๐Ÿช„ Running pre-commit hooks..." - uv run pre-commit run --config .pre-commit-lite.yaml --all-files --show-diff-on-failure + uv run --active pre-commit run --config .pre-commit-lite.yaml --all-files --show-diff-on-failure ruff: ## โšก Ruff lint + (eventually) format @echo "โšก ruff $(TARGET)..." && $(VENV_DIR)/bin/ruff check $(TARGET) From 442de408527d6f8939f2ac3df5b8f8e2b514fb34 Mon Sep 17 00:00:00 2001 From: Brian Hussey Date: Wed, 19 Nov 2025 17:25:21 +0000 Subject: [PATCH 2/4] Activate virtualenv for pylint and pre-commit tasks Signed-off-by: Brian Hussey --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1abd5d463..57461e4b6 100644 --- a/Makefile +++ b/Makefile @@ -1027,7 +1027,10 @@ flake8: ## ๐Ÿ flake8 checks pylint: uv ## ๐Ÿ› pylint checks @echo "๐Ÿ› pylint $(TARGET) (parallel)..." - uv run --active pylint -j 0 --fail-on E --fail-under 10 $(TARGET) + + @test -d "$(VENV_DIR)" || $(MAKE) venv + @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ + uv run --active pylint -j 0 --fail-on E --fail-under 10 $(TARGET)" markdownlint: ## ๐Ÿ“– Markdown linting @# Install markdownlint-cli2 if not present @@ -1073,7 +1076,9 @@ pycodestyle: ## ๐Ÿ“ Simple PEP-8 checker pre-commit: uv ## ๐Ÿช„ Run pre-commit tool @echo "๐Ÿช„ Running pre-commit hooks..." - uv run --active pre-commit run --config .pre-commit-lite.yaml --all-files --show-diff-on-failure + @test -d "$(VENV_DIR)" || $(MAKE) venv + @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ + uv run --active pre-commit run --config .pre-commit-lite.yaml --all-files --show-diff-on-failure" ruff: ## โšก Ruff lint + (eventually) format @echo "โšก ruff $(TARGET)..." && $(VENV_DIR)/bin/ruff check $(TARGET) From c6a851542963f4023ba07431b02886dfed8d45e2 Mon Sep 17 00:00:00 2001 From: Brian Hussey Date: Thu, 20 Nov 2025 10:35:40 +0000 Subject: [PATCH 3/4] Update for readability Signed-off-by: Brian Hussey --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 57461e4b6..da86dcf3a 100644 --- a/Makefile +++ b/Makefile @@ -1027,7 +1027,6 @@ flake8: ## ๐Ÿ flake8 checks pylint: uv ## ๐Ÿ› pylint checks @echo "๐Ÿ› pylint $(TARGET) (parallel)..." - @test -d "$(VENV_DIR)" || $(MAKE) venv @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ uv run --active pylint -j 0 --fail-on E --fail-under 10 $(TARGET)" From a72ac86295940f1714cedbf913018e5be7e787e8 Mon Sep 17 00:00:00 2001 From: Brian Hussey Date: Thu, 20 Nov 2025 11:08:56 +0000 Subject: [PATCH 4/4] Use virtualenv for smoketest Signed-off-by: Brian Hussey --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index da86dcf3a..c14775787 100644 --- a/Makefile +++ b/Makefile @@ -432,7 +432,7 @@ clean: ## --- Automated checks -------------------------------------------------------- smoketest: @echo "๐Ÿš€ Running smoketest..." - @bash -c '\ + @/bin/bash -c 'source $(VENV_DIR)/bin/activate && \ ./smoketest.py --verbose || { echo "โŒ Smoketest failed!"; exit 1; }; \ echo "โœ… Smoketest passed!" \ '