Skip to content

docs: add Triangle and estimator I/O examples (#704) - #1209

Merged
henrydingliu merged 2 commits into
casact:mainfrom
EKtheSage:docs/704-io-examples
Aug 13, 2026
Merged

docs: add Triangle and estimator I/O examples (#704)#1209
henrydingliu merged 2 commits into
casact:mainfrom
EKtheSage:docs/704-io-examples

Conversation

@EKtheSage

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Add doctest Examples for Triangle.to_pickle / Triangle.to_json and the estimator mixins to_pickle / to_json in chainladder/core/io.py.
  • Examples round-trip through read_pickle / read_json so the write methods are shown in the same pattern as the already-documented readers.

Related GitHub Issue(s)

Additional Context for Reviewers

Bite-sized follow-up to the remaining core-module work on #704. Companion PR for slicing: #1208.

Checklist

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

Made with Cursor

@github-actions

github-actions Bot commented Aug 13, 2026

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): 15.1% of exported symbols fully typed (201 / 1333)

Known Ambiguous Unknown Total
Project (head) 201 111 1021 1333

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: 321
  • Functions without default param: 0
  • Classes without docstring: 10

Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.25%. Comparing base (52e655b) to head (083bd6a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1209      +/-   ##
==========================================
- Coverage   91.26%   91.25%   -0.01%     
==========================================
  Files          91       91              
  Lines        5401     5400       -1     
  Branches      691      691              
==========================================
- Hits         4929     4928       -1     
  Misses        338      338              
  Partials      134      134              
Flag Coverage Δ
unittests 91.25% <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

Copy link
Copy Markdown
Member

I'm good with the docstring changes. do you mind addressing the ruff beef while you are here?

The ruff workflow clears per-file ignores on touched files, so the grandfathered lambda assignment failed CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EKtheSage

Copy link
Copy Markdown
Contributor Author

The ruff workflow runs with lint.per-file-ignores={}, so touching io.py surfaced the grandfathered E731 (lambda assigned to j in EstimatorIO.to_json).

Replaced it with an inline dict comprehension and dropped the chainladder/core/io.py ignore from pyproject.toml.

@henrydingliu
henrydingliu merged commit 52be42a into casact:main Aug 13, 2026
13 checks passed
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