Skip to content

Add codecov.yml#41

Merged
mshriver merged 1 commit into
mainfrom
codecov-fixes
Nov 7, 2025
Merged

Add codecov.yml#41
mshriver merged 1 commit into
mainfrom
codecov-fixes

Conversation

@mshriver
Copy link
Copy Markdown
Contributor

@mshriver mshriver commented Nov 7, 2025

Summary by Sourcery

Introduce a Codecov configuration file to enforce CI success, define coverage thresholds, customize reporting flags and comments, and exclude specified paths from coverage analysis

Enhancements:

  • Add codecov.yml to centralize Codecov configuration
  • Require CI to pass before reporting coverage and notify only after CI completes
  • Set coverage precision, rounding, target ranges, and status thresholds for project and patch
  • Configure coverage flags for unittests and customize comment layout and behavior
  • Ignore test/, docs/, markdown files, and setup.py from coverage reports

Copilot AI review requested due to automatic review settings November 7, 2025 12:58
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Nov 7, 2025

Reviewer's Guide

Introduce a new codecov.yml to configure Codecov integration by enforcing CI success, defining coverage measurement and thresholds, categorizing coverage data, formatting PR comments, and excluding unwanted files.

Flow diagram for Codecov coverage reporting process

flowchart TD
  A["CI runs tests"] --> B["Codecov collects coverage data"]
  B --> C["Codecov reads codecov.yml"]
  C --> D["Apply coverage thresholds and rules"]
  D --> E["Format PR comment"]
  E --> F["Report coverage status to PR"]
Loading

File-Level Changes

Change Details Files
Enforce CI requirements and notifications
  • require CI to pass before uploading coverage
  • wait for CI completion before sending notifications
codecov.yml
Define coverage measurement and thresholds
  • set precision to 2 decimals and round down
  • limit coverage range to 70–100%
  • set project and patch targets at 85% with 1% threshold and error on CI failure
codecov.yml
Add coverage flags for unittests
  • tag coverage from ibutsu_client/ under “unittests” flag
  • allow flag data to carry forward across runs
codecov.yml
Configure comment layout and behavior
  • use header, diff, flags, files, footer layout
  • apply default comment behavior
  • allow comments even when coverage hasn’t changed
codecov.yml
Exclude irrelevant files and directories
  • ignore test/ and docs/ directories
  • exclude markdown files and setup.py from coverage
codecov.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Consider using YAML anchors to DRY up the repeated project and patch status blocks instead of duplicating the same target/threshold settings.
  • Double-check that your ignore patterns (e.g. "test/", "docs/", "*.md") correctly match the files you intend to exclude from coverage reporting.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider using YAML anchors to DRY up the repeated project and patch status blocks instead of duplicating the same target/threshold settings.
- Double-check that your ignore patterns (e.g. "test/", "docs/", "*.md") correctly match the files you intend to exclude from coverage reporting.

## Individual Comments

### Comment 1
<location> `codecov.yml:28` </location>
<code_context>
+  unittests:
+    paths:
+      - ibutsu_client/
+    carryforward: true
+
+comment:
</code_context>

<issue_to_address>
**question (testing):** Review whether 'carryforward: true' for flags aligns with your CI workflow.

This setting may hide gaps in coverage for new changes if flags are not consistently present.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread codecov.yml
unittests:
paths:
- ibutsu_client/
carryforward: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (testing): Review whether 'carryforward: true' for flags aligns with your CI workflow.

This setting may hide gaps in coverage for new changes if flags are not consistently present.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a Codecov configuration file to establish coverage reporting standards and automation for the project.

  • Configures coverage thresholds and targets (85% with 1% variance)
  • Sets up flags for tracking unit test coverage separately
  • Defines ignore patterns for non-source files and documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mshriver mshriver merged commit e370357 into main Nov 7, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants