Skip to content

Add pytest-cov integration and establish module-level coverage targets #348

Description

@johnwmillr

Problem

We currently lack integrated coverage reporting and clear module-level targets, which makes it hard to track progress and prevent regressions.

Scope

  1. Add pytest-cov and coverage config
  2. Generate and record baseline coverage
  3. Add CI coverage checks
  4. Track improvements per module

Acceptance Criteria

  • pytest-cov is configured
  • uv run pytest --cov=lyricsgenius --cov-report=term-missing --cov-report=html works
  • Baseline coverage is documented by module
  • CI runs coverage on PRs
  • Minimum threshold is enforced (initially modest, then raised over time)

Initial Module Targets

  • lyricsgenius/api/ >= 90%
  • lyricsgenius/types/ >= 90%
  • lyricsgenius/genius.py >= 85%
  • lyricsgenius/utils.py >= 80%
  • lyricsgenius/auth.py >= 85%

Implementation Plan

Phase 1: Baseline

  • Add pytest-cov
  • Run baseline coverage and capture gaps by module

Phase 2: Enforcement

  • Add CI coverage workflow
  • Enforce initial --cov-fail-under threshold
  • Document contributor commands in README/CONTRIBUTING

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions