From 5fb48434215e748d682e3edece01c6b675635dd8 Mon Sep 17 00:00:00 2001 From: yangm2 Date: Fri, 15 Aug 2025 21:38:11 +0000 Subject: [PATCH 1/3] run coverage and enforce minimum coverage in Makefile and GHA/PR-Check --- .github/workflows/pr-check.yml | 2 +- backend/Makefile | 2 +- backend/pyproject.toml | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 6027920..8f20b74 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -43,7 +43,7 @@ jobs: run: uv run ty check - name: Run tests - run: uv run pytest -v -s + run: uv run pytest -v -s --cov frontend-build: runs-on: ubuntu-latest diff --git a/backend/Makefile b/backend/Makefile index a72e2f2..4995fea 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -35,7 +35,7 @@ typecheck-pyrefly: uv.lock $(PYTHON) run pyrefly check $(TYPECHECK_OPTIONS) --python-interpreter .venv/bin/python3 test: uv.lock - uv run pytest -v -s $(TEST_OPTIONS) + uv run pytest -v -s $(TEST_OPTIONS) --cov clean: find . -type d -name '__pycache__' -exec rm -r {} + diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 8179ded..de58fbe 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -30,6 +30,14 @@ exclude = ["data*"] requires = ["setuptools>=61"] build-backend = "setuptools.build_meta" +[tool.coverage.run] +branch = true +source = ["tenantfirstaid"] + +[tool.coverage.report] +fail_under = 85.0 # percentage of overall coverage +show_missing = true + [dependency-groups] dev = [ "ipdb>=0.13.13", From 7fb92622af41d9eb34e86a70bfe32677ec999802 Mon Sep 17 00:00:00 2001 From: yangm2 Date: Fri, 15 Aug 2025 21:42:22 +0000 Subject: [PATCH 2/3] bump uv version in GHA --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 8f20b74..c346e31 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -25,7 +25,7 @@ jobs: enable-cache: true cache-dependency-glob: "backend/uv.lock" # Install a specific version of uv. - version: "0.7.13" + version: "0.8.11" - name: Set up Python run: uv python install From 6ce2e32d0c26bfef62150f4cf0263416a5ee0368 Mon Sep 17 00:00:00 2001 From: yangm2 Date: Fri, 15 Aug 2025 21:51:34 +0000 Subject: [PATCH 3/3] bump setuptools --- backend/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index de58fbe..e530ba7 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -27,7 +27,7 @@ where = ["."] exclude = ["data*"] [build-system] -requires = ["setuptools>=61"] +requires = ["setuptools>=80"] build-backend = "setuptools.build_meta" [tool.coverage.run]