Skip to content

[FEATURE]: Integrate Codecov into py-launch-blueprint #200

@smorin

Description

@smorin

Feature Type

New Functionality

Priority/Impact

Medium

Problem Statement

The py-launch-blueprint project currently lacks code coverage tracking and reporting. This makes it difficult to measure test effectiveness, identify untested code paths, and maintain visibility of test coverage over time. Integrating Codecov will help ensure the project maintains high-quality test coverage as it evolves.

Requires Proposal

Yes, detailed proposal needed

Proposed Solution

Integrate Codecov into the project's CI/CD pipeline to analyze and report on code coverage:

  1. Add a Codecov configuration file (either .codecov.yml or codecov.yml) to the repository root
  2. Update the CI workflow to generate code coverage reports during test runs
  3. Configure GitHub Actions to upload the coverage reports to Codecov
  4. Add a feature Codecov badge to the README.md file and index.md
  5. Configure Codecov to provide PR comments with coverage changes
  6. Update the justfile with necessary commands for local coverage testing

Implementation steps:

  • Install necessary dependencies for coverage reporting (e.g., pytest-cov)
  • Configure pytest to generate coverage reports in a CI-compatible format
  • Set up a Codecov repository token as a GitHub secret
  • Update GitHub Actions workflow file to upload coverage data

Configuration options:

  • Investigate whether Codecov settings can be integrated into pyproject.toml instead of using a standalone YAML file
  • If not possible, create a standalone .codecov.yml file with appropriate settings for the project

Research Needed

Yes

Research Details

Research is needed to determine:

  1. The optimal coverage reporting format for Python projects in py-launch-blueprint
  2. Best practices for Codecov configuration specific to this project type
  3. Required modifications to existing test structure to maximize coverage reporting accuracy
  4. Determine if there are any specific Codecov features (flags, components) that should be utilized for this project
  5. Evaluate whether Codecov configuration can be integrated into pyproject.toml or if a separate .codecov.yml file is required

Example config

Acceptance Criteria

Please review all of the following criteria that must be met for this feature to be considered complete:

Technical Requirements:

  • Testing is added to the pre-commit hook
  • Testing is added to the CI/CD pipeline in the GitHub Actions
  • Documentation is added and updated into the documentation in Sphinx
  • Command has been added (if necessary)

Acceptance Criteria Confirmation

Yes

Pre-submission Confirmation

Yes

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions