Skip to content

Re-enable subprocess coverage in .coveragerc - #43

Merged
endolith merged 1 commit into
masterfrom
fix/subprocess-coverage
Aug 23, 2026
Merged

Re-enable subprocess coverage in .coveragerc#43
endolith merged 1 commit into
masterfrom
fix/subprocess-coverage

Conversation

@endolith

@endolith endolith commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Problem

Coverage dropped from ~80% to ~61% on the master CI run without any code change.

scripts/measure_freq.py and scripts/wave_analyzer.py are tested via subprocess. That subprocess coverage was measured automatically by pytest-cov's .pth mechanism. pytest-cov 7.0.0 (Sept 2025) removed automatic subprocess measurement; it now requires coverage.py's native subprocess patching. The last successful Codecov report predates this (Dec 2024, pytest-cov 6.x); the first successful run since installed pytest-cov 7.x and script coverage collapsed to 0%.

Fix

Add [run] patch = subprocess to .coveragerc to re-enable subprocess measurement (requires coverage >= 7.10.6).

Verification

Run on this branch, scripts coverage should return to non-zero in the Codecov report.

Summary by CodeRabbit

  • Chores
    • Updated test coverage configuration to include code run in subprocesses.

pytest-cov 7.0.0 dropped automatic subprocess measurement; coverage.py
must be told to patch subprocesses explicitly (patch = subprocess,
requires coverage >= 7.10.6). Without this, the measure_freq /
wave_analyzer script tests report 0% and total coverage drops.

Co-authored-by: opencode <opencode@anomalyco.ai>
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a4998774-48df-4682-8592-dade1b04f27a

📥 Commits

Reviewing files that changed from the base of the PR and between 812aa30 and b8b5f0e.

📒 Files selected for processing (1)
  • .coveragerc

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The coverage configuration adds a [run] section with patch = subprocess.

Changes

Coverage configuration

Layer / File(s) Summary
Enable subprocess coverage
.coveragerc
The coverage configuration enables subprocess patching during coverage execution.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: 🔵 Low · up to b8b5f

This change re-enables subprocess coverage, but it depends on CI using coverage.py 7.10.6 or newer; verify or pin that dependency before merging to avoid continued missing coverage.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: re-enabling subprocess coverage in .coveragerc.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/subprocess-coverage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@endolith
endolith merged commit 2202b5c into master Aug 23, 2026
11 checks passed
@endolith
endolith deleted the fix/subprocess-coverage branch August 23, 2026 23:36
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