Skip to content

ci: Add coverage reporting to CI - #55

Merged
cbueth merged 2 commits into
mainfrom
chore/add-codecov-ci
Jul 30, 2026
Merged

ci: Add coverage reporting to CI#55
cbueth merged 2 commits into
mainfrom
chore/add-codecov-ci

Conversation

@cbueth

@cbueth cbueth commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Integrate Codecov into the CI pipeline for branch-coverage tracking on PRs, and raise baseline coverage to 100%.

Changes

add test.yml on the latest test run pytest with --cov=delaynet --cov-branch --cov-report=xml and upload via codecov/codecov-action@v5.

codecov.yml, new config enforcing:

  • patch target 100%: all new/modified lines must be covered on every PR
  • project target auto with 2% threshold: overall coverage must not drop meaningfully
  • Codecov app should comment on PR with diff coverage summary

Added Codecov badge

Added few missing lines:

  • granger.py: LinAlgError fallback (mock np.linalg.solve to raise)
  • metrics.py: removed dead if max_betweenness > 0 branch (always True when reached)
  • network_reconstruction.py: direct tests for parallel worker functions using real shared memory

cbueth added 2 commits July 30, 2026 19:15
Add Codecov integration for branch-coverage tracking:
- Run pytest with --cov=delaynet --cov-branch on latest Python matrix entry
- Upload via codecov/codecov-action@v5 using CODECOV_TOKEN secret
- Enforce 100% patch coverage on PRs (codecov.yml)
- Add Codecov badge to README
- test_granger: mock np.linalg.solve to raise LinAlgError on second
  call, covering the lstsq fallback at granger.py:92-94
- metrics: remove redundant if max_betweenness > 0 guard (always True
  when reached due to outer n_nodes > 2 check), eliminating dead branch
- test_network_reconstruction: direct tests for parallel worker
  functions _compute_pair_connectivity_shared and _compute_with_progress
  using real shared memory setup
@cbueth cbueth self-assigned this Jul 30, 2026
@codecov

codecov Bot commented Jul 30, 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 ☂️

@codspeed-hq

codspeed-hq Bot commented Jul 30, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 18.83%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 26 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_detrend_method[z_score-p10] 1.8 ms 2.3 ms -22.27%
test_ordinal_patterns 11.6 ms 13.7 ms -15.25%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing chore/add-codecov-ci (34361ea) with main (0a01312)

Open in CodSpeed

@cbueth
cbueth merged commit 875adcd into main Jul 30, 2026
11 of 12 checks passed
@cbueth
cbueth deleted the chore/add-codecov-ci branch July 30, 2026 18:00
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