Skip to content

docs: add doctest Examples for correlation, Munich, tails, adjustments, workflow, and utils#792

Closed
EKtheSage wants to merge 3 commits into
casact:mainfrom
EKtheSage:docs/examples-correlation-munich-trend-etc
Closed

docs: add doctest Examples for correlation, Munich, tails, adjustments, workflow, and utils#792
EKtheSage wants to merge 3 commits into
casact:mainfrom
EKtheSage:docs/examples-correlation-munich-trend-etc

Conversation

@EKtheSage
Copy link
Copy Markdown
Contributor

@EKtheSage EKtheSage commented May 15, 2026

Summary

  • Add Examples sections with .. testsetup::, .. testcode::, and .. testoutput:: Sphinx doctest directives to 14 files across the codebase
  • Each example demonstrates meaningful parameter effects using cl.load_sample() data and reproducible round() output
  • Covers: BerquistSherman, BootstrapODPSample, ParallelogramOLF, TrendAdjustment, DevelopmentCorrelation, ValuationCorrelation, ConstantDevelopment, MunichChainladder, CaseOutstanding, BondyTail, ClarkTail, TailCurve, GridSearch, VotingChainladder, and utility functions

Files changed

Module File
adjustments berqsherm.py, bootstrap.py, parallelogram.py, trend.py
core correlation.py
development constant.py, munich.py, outstanding.py
tails bondy.py, clark.py, curve.py
utils utility_functions.py
workflow gridsearch.py, voting.py

Test plan

  • Verify Sphinx doctest build runs without errors on all modified files
  • Confirm .. testoutput:: blocks match actual estimator output
  • Check that import placement (import chainladder in testsetup, other imports in testcode) is consistent

Note

Medium Risk
Mostly documentation-only doctest additions, but it also introduces a GitHub Action that auto-merges and pushes main into docs/great-docs-prototype, which could cause unexpected branch updates or merge conflicts if misconfigured.

Overview
Adds extensive Sphinx doctest Examples blocks to a wide set of estimators/utilities (adjustments, correlation, development, tails, workflow, and utility_functions) to demonstrate parameter effects with reproducible outputs.

Introduces a new GitHub Actions workflow (sync-main-to-docs.yml) that, on every push to main, checks out docs/great-docs-prototype, merges origin/main into it, and pushes the result back to the remote branch.

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

EKtheSage and others added 3 commits May 14, 2026 00:20
On every push to main, GitHub Actions automatically merges main into
docs/great-docs-prototype so the docs branch stays current with all
code changes while keeping its doc-engine files intact.
…amily

Add Sphinx .. testsetup:: / .. testcode:: / .. testoutput:: blocks showing
parameter effects for DevelopmentCorrelation, ValuationCorrelation,
DevelopmentConstant, MunichAdjustment, CaseOutstanding, BootstrapODPSample,
BerquistSherman, and Trend (axis, piecewise trends, compound Trend with
CapeCod on clrd). Use random_state=42 in BootstrapODPSample example.
Parameters and Attributes sections are unchanged.

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

Add Sphinx parameter-effect Examples for GridSearch, Pipeline, VotingChainladder
(weights), read_pickle, minimum, maximum, read_json, concat, TailCurve, TailBondy,
TailClark, and ParallelogramOLF. Replace PatsyFormula toy-DataFrame example with
genins-based TweedieGLM and DevelopmentML pipeline demonstrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ce197a6. Configure here.

git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout docs/great-docs-prototype
git merge origin/main --no-edit -m "chore: sync main into docs/great-docs-prototype"
git push origin docs/great-docs-prototype
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unrelated CI workflow file included in docs PR

Low Severity

The new sync-main-to-docs.yml workflow file is not mentioned anywhere in the PR description's "Files changed" table, which exclusively lists Python source files. This workflow — which auto-merges main into docs/great-docs-prototype on every push — is unrelated to adding doctest examples and appears to have been accidentally included in this documentation-focused PR.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ce197a6. Configure here.

@henrydingliu
Copy link
Copy Markdown
Collaborator

echoing @kennethshsu 's concerns from #786 , this is a whale of a PR.

@kennethshsu
Copy link
Copy Markdown
Collaborator

Hi @EKtheSage, this is a big PR too. I would encourage smaller PRs going forward. I think 2-3 methods max for the docstrings improvements.

Can you resolve the merge conflict with another commit and I will help review this?

@EKtheSage
Copy link
Copy Markdown
Contributor Author

Closing as superseded by smaller scoped PRs for #704: #800, #801, #803, and #804 cover the adjustment family, tails, workflow, and utility work from this branch. The replacement PRs are rebased from current main, scoped by subsystem, and intentionally exclude .github/workflows/sync-main-to-docs.yml.

@EKtheSage EKtheSage closed this May 16, 2026
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.

3 participants