Skip to content

100% code coverage #445

Done
Done

Description

@MaxGhenis
No description provided.

Activity

  1. DTrim99 commented on Dec 3, 2026

    @DTrim99
    Collaborator

    Closing as superseded: the need is met by a different design.

    What this asked for: a repo-wide 100% code coverage target. The issue has no body or acceptance criteria.

    What replaced it:

    • Coverage is now gated per PR. codecov.yml makes Codecov's patch status the gate (target: auto). The patch status measures the lines a PR changes. The project status is informational only. The comment in that file explains why: coverage comes only from the tests the PR workflow selects for the changed files, so project percentages aren't comparable between a PR and its base, and a fixed repo-wide percentage can't be enforced reliably.
    • .coveragerc measures only */variables/*, the tax and benefit logic.
    • CLAUDE.md allows # pragma: no cover only for code that unit tests can't reach: microsim branches (simulation.is_over_dataset, simulation.has_axes) and behavioral-response branches (simulation.get_branch(), simulation.baseline). Code that just lacks tests, hard-to-test logic, and edge cases or error handling must get tests instead. Eight lines under policyengine_us/variables carry the pragma.

    How it got there: #7310 added the # pragma: no cover policy, and #9777 made the project status informational.

    Checked against main at b3a142b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions