From d116326a09353c8906d5013c6676ba11c63b0597 Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 9 May 2025 13:24:56 +0100 Subject: [PATCH 1/2] Ensure coverage is measuring against the source! --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 030d42e..742581f 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,6 @@ fix: .PHONY: test test: - uv run coverage run --module pytest test + uv run coverage run --source src --module pytest test uv run coverage report uv run coverage html From dfd5ed0a17f3d7f71d2f2f826505111a5ac4cff8 Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 9 May 2025 13:27:16 +0100 Subject: [PATCH 2/2] Improve directory definitions in Makefile --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 742581f..03dccc3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -SRCDIR=. +SRCDIR=src +TESTDIR=test +CODEDIRS=$(SRCDIR) $(TESTDIR) .PHONY: bootstrap bootstrap: @@ -9,23 +11,23 @@ check: black lint mypy .PHONY: black black: - uv run black --check $(SRCDIR) + uv run black --check $(CODEDIRS) .PHONY: lint lint: - uv run ruff check $(SRCDIR) + uv run ruff check $(CODEDIRS) .PHONY: mypy mypy: - uv run mypy $(SRCDIR) + uv run mypy $(CODEDIRS) .PHONY: fix fix: - uv run black $(SRCDIR) - uv run ruff check --fix $(SRCDIR) + uv run black $(CODEDIRS) + uv run ruff check --fix $(CODEDIRS) .PHONY: test test: - uv run coverage run --source src --module pytest test + uv run coverage run --source $(SRCDIR) --module pytest test uv run coverage report uv run coverage html