Skip to content

test: achieve 100% test coverage and require it in Makefile#500

Merged
jmeridth merged 1 commit into
mainfrom
zkoppert/100-percent-coverage
Jun 16, 2026
Merged

test: achieve 100% test coverage and require it in Makefile#500
jmeridth merged 1 commit into
mainfrom
zkoppert/100-percent-coverage

Conversation

@zkoppert

Copy link
Copy Markdown
Collaborator

Proposed Changes

The bot-skip branch in the repo.contributors() path (line 193 of contributors.py) was the only uncovered line, keeping coverage at 99.69%. I added a test that exercises this path with a [bot] user and raised the Makefile coverage threshold from 80% to 100% so regressions are caught immediately.

Metric Before After
Total coverage 99.69% 100%
Uncovered lines 1 0
--cov-fail-under 80 100
Test count 64 passed 65 passed

Tradeoffs: Requiring 100% means future contributors must cover new lines before merging. Given the repo's small surface area (322 statements), this is a reasonable gate that prevents coverage drift without being burdensome.

Testing

I ran make test and confirmed all 65 tests pass with 100% coverage. I ran make lint and confirmed a clean 10.00/10 pylint score with no issues from flake8, isort, mypy, or black.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

I added a test for the bot-skip branch in the repo.contributors() path
(contributors.py line 193) and raised the coverage threshold from 80%
to 100% in the Makefile test target.

Coverage moves from 99.69% to 100%.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR achieves 100% test coverage by adding a test for the bot-skip branch in the repo.contributors() path (the else branch when no end_date is provided), and raises the Makefile coverage threshold from 80% to 100% to prevent future coverage regression.

Changes:

  • Added test_get_contributors_no_end_date_skips_bot test that exercises the bot-skip logic at line 192 of contributors.py
  • Raised --cov-fail-under threshold in the Makefile from 80 to 100
Show a summary per file
File Description
test_contributors.py Adds a new test verifying that bot users (e.g., dependabot[bot]) are skipped when using the repo.contributors() path (no end date)
Makefile Raises the pytest coverage failure threshold from 80% to 100%

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@zkoppert zkoppert marked this pull request as ready for review June 16, 2026 14:48
@zkoppert zkoppert requested a review from jmeridth as a code owner June 16, 2026 14:48
@jmeridth jmeridth merged commit 476ee20 into main Jun 16, 2026
36 checks passed
@jmeridth jmeridth deleted the zkoppert/100-percent-coverage branch June 16, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants