Skip to content

#745#775

Merged
kennethshsu merged 6 commits into
mainfrom
#745
May 13, 2026
Merged

#745#775
kennethshsu merged 6 commits into
mainfrom
#745

Conversation

@kennethshsu
Copy link
Copy Markdown
Collaborator

@kennethshsu kennethshsu commented May 12, 2026

Summary of Changes

Added the new CLRD datadump

Related GitHub Issue(s)

Closes #745

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

Low Risk
Low risk: primarily adds a new packaged CSV sample dataset and small load_sample routing/tests/docs updates, with minimal impact beyond sample-data loading.

Overview
Adds the new clrd2025 CAS Schedule P refresh sample dataset to the packaged distribution (via MANIFEST.in) so it ships with the library.

Updates load_sample to recognize clrd2025 and map it to the refreshed column naming, and adds tests/documentation coverage to ensure the new sample loads and matches expected LOBs/years/columns.

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

kennethshsu and others added 5 commits May 7, 2026 16:52
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)
@kennethshsu kennethshsu marked this pull request as ready for review May 12, 2026 00:43
Copy link
Copy Markdown
Collaborator

@henrydingliu henrydingliu left a comment

Choose a reason for hiding this comment

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

manifest not updated

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.08%. Comparing base (51fb041) to head (f8dd20b).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #775      +/-   ##
==========================================
+ Coverage   85.94%   86.08%   +0.13%     
==========================================
  Files          85       86       +1     
  Lines        4924     4923       -1     
  Branches      637      638       +1     
==========================================
+ Hits         4232     4238       +6     
+ Misses        491      486       -5     
+ Partials      201      199       -2     
Flag Coverage Δ
unittests 86.08% <100.00%> (+0.13%) ⬆️

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.

@kennethshsu
Copy link
Copy Markdown
Collaborator Author

I just tried to play around with it. But what I got (AI assisted) is super messy. What idea do you have to do this cleanly?

@henrydingliu
Copy link
Copy Markdown
Collaborator

i'm good with just adding all the new datasets to manifest.in for this pr. this never went away

@kennethshsu
Copy link
Copy Markdown
Collaborator Author

Are you still having trouble loading the sample data? It works for me

cl.load_sample("friedland_us_industry_auto")

@henrydingliu
Copy link
Copy Markdown
Collaborator

ran this just now. different error though

image

@henrydingliu
Copy link
Copy Markdown
Collaborator

actually, the data is coming with the package. i'm good with this pr

image

@kennethshsu
Copy link
Copy Markdown
Collaborator Author

I am going to take a wild wild shot here...

How did you launch your Jupyter book? Are you doing it via uv? I don't like how you are seeing that at all, and I had something similar in the past where my environment was not "sterile".

Try uv run jupyter-lab.

@kennethshsu kennethshsu merged commit 295489f into main May 13, 2026
9 checks passed
@kennethshsu kennethshsu deleted the #745 branch May 13, 2026 03:47
@henrydingliu
Copy link
Copy Markdown
Collaborator

i'm in databricks. i launch jupyter through their UI. the environment is super sterile. all the user installed packages are wiped after each session. here is what it looks like if i just open up a new notebook. it's basically the same as someone who just installed python and installed chainladder for the first time.
image

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.

Include the new CAS Schedule P data

3 participants