Skip to content

rebasing#791

Merged
henrydingliu merged 57 commits into
experimentalfrom
main_copy
May 15, 2026
Merged

rebasing#791
henrydingliu merged 57 commits into
experimentalfrom
main_copy

Conversation

@henrydingliu
Copy link
Copy Markdown
Collaborator

@henrydingliu henrydingliu commented May 15, 2026

Summary of Changes

Related GitHub Issue(s)

Additional Context for Reviewers

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

Note

Medium Risk
Changes the ParallelogramOLF on-level factor calculation API/behavior via a new policy_length parameter and updates CI to run on all pushes, which could affect downstream results and build frequency but is well-covered by new tests.

Overview
Enhances ParallelogramOLF/parallelogram_olf to support a configurable policy_length (in months) and clarifies the API by switching the helper parameter name to dates, with updated docs/examples for daily vs monthly approximations.

Greatly expands test_parallelogram.py to validate vertical vs non-vertical methods, policy_length effects, and daily/monthly behavior; updates development pipeline tests to explicitly assert the existing “Some exclusions have been ignored…” warning, and adds slicing accessor exception tests.

Packaging/ops tweaks: includes the clrd2025.csv sample in MANIFEST.in, refreshes README badges (adds conda-forge), and enables the unit test workflow to run on push to all branches.

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

genedan and others added 30 commits May 6, 2026 17:10
…nctions to sparse.COO, and keep module-level functions to sp.

Replaces xp() with xp.COO() to create sparse arrays when xp used to be callable and was used as a constructor.
Bumps [mistune](https://github.com/lepture/mistune) from 3.1.4 to 3.2.1.
- [Release notes](https://github.com/lepture/mistune/releases)
- [Changelog](https://github.com/lepture/mistune/blob/main/docs/changes.rst)
- [Commits](lepture/mistune@v3.1.4...v3.2.1)

---
updated-dependencies:
- dependency-name: mistune
  dependency-version: 3.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Build(deps): Bump mistune from 3.1.4 to 3.2.1
kennethshsu and others added 27 commits May 8, 2026 17:54
Enhance docstrings and examples for improved clarity for many estimators
Closes #757

The Adjustments section header in docs/library/api.md was a copy-paste
of the Workflow section. The :mod: link and .. automodule:: directive
both pointed at chainladder.workflow, so the rendered RTD page for
Adjustments hyperlinked to the Workflow module page.

The four classes listed under Adjustments (BootstrapODPSample,
BerquistSherman, Trend, ParallelogramOLF) all live in
chainladder.adjustments, which is the correct target.

Co-authored-by: Nick Kinney <nkinney06@gmail.com>
…p() (#761)

Per maintainer feedback on #758/#761: matplotlib is needed at runtime
for TriangleDisplay.heatmap() even though it isn't imported directly,
so it must remain a core dependency. Add an inline comment so future
contributors don't try to move it again.

Co-authored-by: Nick Kinney <nkinney06@gmail.com>
REFACTOR: Reorganize type hierarchy of sparse.py. Move array-level fu…
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Build(deps): Bump urllib3 from 2.6.3 to 2.7.0
Adds the clrd2025 branch in load_sample mirroring the existing clrd
config, but using the modernized CAS Schedule P column names
(IncurredLosses rather than IncurLoss). Updates the docstring's
complete dataset list and the sample-data documentation page. Adds a
targeted test asserting the six LOBs, modern column names, and origin
starting at 1998.

The underlying clrd2025.csv was added by @kennethshsu on branch #745.

Closes part of #745.
feat(data): wire clrd2025 into load_sample, docs, and tests (#745)
#765) (#777)

* test(development): assert exclusions-ignored UserWarning in drop tests (#765)

Per #765, ~75 UserWarnings firing from chainladder/development/base.py
during tests that deliberately exercise the drop/exclusion path were
not being asserted. Wrapping each warning-producing call in
`pytest.warns(UserWarning, match=...)` makes the contract explicit:
the test fails if the warning stops firing OR if its message changes.

Per @kennethshsu's preference on the issue thread, used the
`pytest.warns` idiom uniformly (no blanket `@pytest.mark.filterwarnings`),
so each individual call site that should warn does so observably.

Affected tests (chainladder/development/tests/):
  - test_development.py: test_drophighlow (5 of 7 calls), test_new_drop_5,
    test_new_drop_5a (both _set_weight_func calls), test_new_drop_7,
    test_pipeline (both fits)
  - test_incremental.py: test_pipeline (both fits); added `import pytest`

The two `test_drophighlow` calls that don't warn (`drop_high=0` and
`drop_high=[T,F,T,F]`) were left untouched — wrapping them would
incorrectly require a warning that doesn't fire.

Verified locally: 671 passed, 12 xfailed (pre-existing). Targeted
6-test 'exclusions ignored' warning count drops from 10 to 4 in the
pytest summary (the remaining 4 are pytest's source-line accounting
from inside the `pytest.warns` blocks, not leaked warnings).

Refs #765.

* Annotate exclusions-ignored warning as test-asserted

Add an in-source comment above each warnings.warn(...) call for the
'Some exclusions have been ignored...' UserWarning, noting that the
message is matched by pytest.warns(..., match=...) in the development
test suite. Future edits to the warning text must update the
corresponding test matchers.

Addresses review feedback on #777.
* uncomment the test runs on push

* badges, rearrangement, words
* Implemented policy_length

* undo the refactor

* added tests for policy_length

* Fixed bug to round D to int

* Fixed an issue on the tests

* Removed blank line

* Formatted with black

* Added more tests

* clarification

* Moved the parallelogram tests from utilities to parallelogram file

* Refactored leap and nonleap

* Improved docstring with assumption

* Refactored, all bugs resolved

* Cleaned up debugger

* Clean up, removed debugger

* Added a guard to prevent averaging nothing

* Added another simple example

* Added Henry's tests

* Fixed bugbot errors

* Added 2 new tests

* Removed the fstring
* Improved docstring and added two examples

* Added a new test iat exceptions - thanks HL

* Allowing project to drop a threshold of 0.1%
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 93.20388% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.17%. Comparing base (60f8446) to head (f28473d).
⚠️ Report is 6 commits behind head on experimental.

Files with missing lines Patch % Lines
chainladder/utils/utility_functions.py 92.78% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           experimental     #791      +/-   ##
================================================
+ Coverage         85.94%   86.17%   +0.22%     
================================================
  Files                85       86       +1     
  Lines              4924     4925       +1     
  Branches            637      639       +2     
================================================
+ Hits               4232     4244      +12     
+ Misses              491      484       -7     
+ Partials            201      197       -4     
Flag Coverage Δ
unittests 86.17% <93.20%> (+0.22%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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 7a160ab into experimental May 15, 2026
15 checks passed
@henrydingliu henrydingliu deleted the main_copy branch May 15, 2026 05:04
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.

5 participants