Skip to content

Add branch coverage config + CI gate + artifact #64

Closed

Description

@neuromechanist

pytest.ini already runs --cov=pyAMICA (term/html/xml) but nothing consumes it. Make coverage actionable, especially branch coverage given the many conditionals in the NG backend.

Tasks

  • Add [tool.coverage.run] (source=pyAMICA, branch = true, omit tests/ + __main__/CLI entrypoints) and [tool.coverage.report] (show_missing, exclude_lines for pragmas / if __name__ / TYPE_CHECKING, precision).
  • Enable branch coverage (currently line-only).
  • Exclude the test files themselves from the coverage denominator.
  • CI: upload the HTML report as an artifact and enforce a --cov-fail-under threshold (ratchet from the measured baseline; report-only first commit, then gate).
  • Confirm the torch tests are actually counted in CI coverage (they run on the Linux runner; only the Fortran-binary slow tests are excluded).

Folded in with the test-hardening work (#61, #15).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions