Skip to content

[TEST] Adding coverage#1105

Merged
henrydingliu merged 1 commit into
mainfrom
dr_tests
Jul 10, 2026
Merged

[TEST] Adding coverage#1105
henrydingliu merged 1 commit into
mainfrom
dr_tests

Conversation

@henrydingliu

@henrydingliu henrydingliu commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary of Changes

a couple of tests for if statements

Related GitHub Issue(s)

#1088

Additional Context for Reviewers

doctest in disposal_rate_tri does not get executed because properties are excluded

  • I passed tests locally for both code (uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)

Note

Low Risk
Small behavioral guard in disposal_rate_tri plus tests and docstring cleanup; no auth or critical infrastructure changes.

Overview
Adds pytest coverage for disposal_rate_tri on a full Chainladder triangle (ultimate disposal rate equals 1) and on DisposalRate output with sample_weight (early development columns stay NaN when weights apply).

Triangle.disposal_rate_tri now applies disposal_w_ only when its shape matches the working triangle, mirroring the link_ratio / w_ pattern and avoiding incorrect broadcasting when shapes differ.

The property’s doctest block was removed because property examples are not executed by the doc test builder.

Reviewed by Cursor Bugbot for commit d5d6c66. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown

Pyright Type Completeness

View the full pyright --verifytypes output for this commit

Project (full chainladder package, at this PR's head): 14.6% of exported symbols fully typed (185 / 1271)

Known Ambiguous Unknown Total
Project (head) 185 106 980 1271

Other symbols referenced but not exported by chainladder: 13

Known Ambiguous Unknown Total
Other (head) 3 1 9 13

Symbols without documentation:

  • Functions without docstring: 313
  • Functions without default param: 0
  • Classes without docstring: 10

Patch (exported symbols added or changed by this PR): 0.0% fully typed (0 / 2)

Known Ambiguous Unknown Total
Patch 0 0 2 2
Patch symbol details
Symbol Status Change
chainladder.adjustments.tests.test_disposal.test_full_disposal_rate_tri ❌ unknown new
chainladder.adjustments.tests.test_disposal.test_weighted_disposal_rate_tri ❌ unknown new

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.50%. Comparing base (6c9ce99) to head (d5d6c66).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1105      +/-   ##
==========================================
+ Coverage   90.48%   90.50%   +0.01%     
==========================================
  Files          91       91              
  Lines        5289     5289              
  Branches      671      671              
==========================================
+ Hits         4786     4787       +1     
  Misses        359      359              
+ Partials      144      143       -1     
Flag Coverage Δ
unittests 90.50% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henrydingliu henrydingliu merged commit 4ebac68 into main Jul 10, 2026
18 checks passed
@henrydingliu henrydingliu deleted the dr_tests branch July 10, 2026 14:57
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