Skip to content

Add codecov#1889

Open
Dreamsorcerer wants to merge 7 commits intodevfrom
codecov
Open

Add codecov#1889
Dreamsorcerer wants to merge 7 commits intodevfrom
codecov

Conversation

@Dreamsorcerer
Copy link
Copy Markdown
Collaborator

Add codecov, so we can easily see coverage changes in each PR.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR adds Codecov integration by wiring up coverage run/coverage xml in the CI workflow (unconditionally, including on PRs) and introducing a .coveragerc.toml config and a .codecov.yml. The workflow change correctly fulfils the PR's stated goal of seeing coverage diffs on each PR.

  • P1 — .coveragerc.toml section headers are wrong: Coverage.py reads .coveragerc.toml as TOML and expects [tool.coverage.run] / [tool.coverage.report]; the current bare [run] / [report] headers are INI conventions and are silently ignored, meaning branch coverage, source restriction, and all exclusion patterns have no effect.

Confidence Score: 4/5

Safe to merge after fixing the TOML section headers in .coveragerc.toml; the workflow change itself is correct.

One P1 issue: the .coveragerc.toml config is silently ignored due to wrong section headers, so branch coverage and exclusions won't apply until fixed. The CI/Codecov wiring is otherwise correct and the previous push-only gating concern is resolved.

.coveragerc.toml — section headers must be changed to [tool.coverage.run] and [tool.coverage.report].

Important Files Changed

Filename Overview
.coveragerc.toml New coverage config file — uses INI-style [run]/[report] headers in a .toml file, which coverage.py won't recognise; all settings silently ignored. Needs [tool.coverage.run] / [tool.coverage.report].
.codecov.yml Minimal Codecov config setting dev as default branch and suppressing missing-data errors; reasonable for bootstrapping.
.github/workflows/ci.yml Coverage now runs unconditionally (no push-only gate), collecting coverage.xml and uploading to Codecov on every CI run including PRs — the stated PR goal is met.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Actions
    participant COV as coverage.py
    participant CC as Codecov

    GH->>COV: coverage run -m pytest (all events: push + PR)
    COV-->>GH: coverage.xml
    GH->>CC: codecov/codecov-action@v6 (upload coverage.xml)
    CC-->>GH: Coverage report posted to PR
Loading

Reviews (2): Last reviewed commit: "Update ci.yml" | Re-trigger Greptile

Comment thread .github/workflows/ci.yml Outdated
@Dreamsorcerer Dreamsorcerer marked this pull request as draft April 21, 2026 19:04
@Dreamsorcerer Dreamsorcerer marked this pull request as ready for review April 22, 2026 14:13
Comment thread .coveragerc.toml
Comment on lines +1 to +14
[run]
branch = true
source = [
'dimos',
]

[report]
exclude_also = [
'if TYPE_CHECKING',
'assert False',
': \.\.\.(\s*#.*)?$',
'^ +\.\.\.$',
'pytest.fail\('
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Wrong TOML section headers — config silently ignored

Coverage.py auto-discovers .coveragerc.toml as a TOML file, but when read as TOML it expects [tool.coverage.run] / [tool.coverage.report] section headers. The bare [run] and [report] headers shown here are INI-format conventions; they are not recognized under TOML parsing, so branch = true, source, and all exclude_also patterns are silently dropped.

Suggested change
[run]
branch = true
source = [
'dimos',
]
[report]
exclude_also = [
'if TYPE_CHECKING',
'assert False',
': \.\.\.(\s*#.*)?$',
'^ +\.\.\.$',
'pytest.fail\('
]
[tool.coverage.run]
branch = true
source = [
'dimos',
]
[tool.coverage.report]
exclude_also = [
'if TYPE_CHECKING',
'assert False',
': \.\.(\s*#.*)?$',
'^ +\.\.\.$',
'pytest.fail\('
]

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.

1 participant