Skip to content

Conversation

@husnain067
Copy link
Collaborator

@husnain067 husnain067 commented Jun 11, 2025

Feature Pull Request

Branch Naming Convention

Current branch: feature/integrate-codecov

Related Issue

Closes #200

Feature Description

This PR integrates code coverage reporting into the project using pytest-cov and updates the justfile to include a coverage command. It enables automated coverage reports to be generated in terminal and XML formats to help maintain test quality and support CI tools.

Implementation Details

Add the codecov dependency and add all the required commands in the justfile for testing, and add the codecov report for ci workflow.

Changes Made

  • Added pytest-cov as a test dependency.
  • Add the commands to just file to test codecov.
  • Configured coverage output to generate coverage.xml for CI tools.
  • Generates coverage.xml for CI tools (e.g., Codecov).
  • Updated documentation on how to run tests and coverage locally.

Testing Performed

Manually test the new commands added in the just file.
just coverage
Manually test it generates the report for cov.

Testing Instructions

1: Run Tests with Coverage
just coverage

This will:

  • Run all tests with coverage tracking using pytest.

  • Display a coverage summary in the terminal.

  • Generate a coverage.xml file in the project root inside /htmlcov.

  • Confirm coverage.xml is created in the root directory.
    -Open htmlcov/index.html in a browser to visually inspect coverage by file or use the just command
    just open-coverage-report.

2: CI/CD Coverage Reporting
In addition to local testing, check coverage is automatically run and uploaded to Codecov via GitHub Actions in the workflow Upload coverage report to Codecov section.

Documentation Updates

  • Update the Readme file with the Codecov section.
  • Add a new section for code-cov.md file.

Breaking Changes

Checklist

  • Branch name follows convention (feature/description or feature/issue-number-description)
  • Testing added to pre-commit hook (pre-commit run --all-files passes)
  • Testing added to CI/CD pipeline in GitHub Actions
  • Documentation added/updated in Sphinx
  • Appropriate unit test coverage added (run pytest --cov to verify)
  • New commands added to CLI (if applicable)
  • Code follows project style guidelines (flake8 or equivalent passes)
  • All tests pass locally and in CI
  • Self-review of code performed
  • No debug print statements or commented-out code left in the codebase

Reviewer Notes

@husnain067 husnain067 added this to the v1 milestone Jun 11, 2025
@husnain067 husnain067 self-assigned this Jun 11, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 11, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/codecov/codecov-action 4.*.* 🟢 7.6
Details
CheckScoreReason
Dependency-Update-Tool🟢 10update tool detected
Code-Review🟢 8Found 15/17 approved changesets -- score normalized to 8
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1014 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 2dependency not pinned by hash detected -- score normalized to 2
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Security-Policy🟢 10security policy file detected
SAST🟢 10SAST tool is run on all commits
CI-Tests🟢 1028 out of 28 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 13 contributing companies or organizations

Scanned Files

  • .github/workflows/ci.yaml

@husnain067 husnain067 marked this pull request as ready for review June 13, 2025 10:59
@husnain067 husnain067 enabled auto-merge June 13, 2025 10:59
@husnain067 husnain067 requested a review from smorin June 13, 2025 10:59
@husnain067 husnain067 requested a review from Tatianah3 June 13, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants