Skip to content

sync#920

Merged
henrydingliu merged 36 commits into
experimentalfrom
main
Jun 4, 2026
Merged

sync#920
henrydingliu merged 36 commits into
experimentalfrom
main

Conversation

@henrydingliu
Copy link
Copy Markdown
Collaborator

@henrydingliu henrydingliu commented Jun 4, 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
Explicit imports may break callers that relied on leaked submodule names on import chainladder; bootstrap index labeling changes simulation triangle metadata for multi-index inputs.

Overview
This PR tightens the public API by replacing wildcard import * with explicit exports and __all__ on subpackages, and adds test_public_api.py so curated names stay stable and implementation modules (e.g. mack, glm) no longer appear on chainladder.

cl.options gains a pandas-style pat argument (with deprecated option=), a working describe_option() (regex / pipe patterns, doctest examples), and deprecation warnings when selecting cupy via options or Triangle.set_backend('cupy').

BootstrapODPSample now labels bootstrap output with a Simulation_# index, including multi-index triangles (new test). CI installs docs extras for unit tests, runs doctest coverage under coverage run, and uploads coverage-doctest.xml. A new bundled sample friedland_gl_self_insurer is registered in the manifest; uv.lock drops direct numba from the package deps and bumps numpy constraint wording.

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

genedan and others added 30 commits May 28, 2026 13:20
Emit DeprecationWarning when the cupy backend is selected, without removing functionality:

- Options.set_option warns for ARRAY_BACKEND='cupy' and for 'cupy' in ARRAY_PRIORITY.

- Common.set_backend warns when backend='cupy'.

Adds tests asserting the warnings fire and that non-cupy backends do not warn.
Move the DeprecationWarning to set_backend's public entry point and add a private _warn guard so internal recursive (inplace) and deep-child calls do not re-warn. This makes stacklevel=2 point at the user's call site and ensures exactly one warning fires. Strengthens the test to assert a single warning at the caller's file.
…nto #902_-friedland_gl_insurer_claims_data
Docs-only; no runtime, config, or public API changes.

Clean-up
Deletes the 36 .rst stub files under docs/library/generated/.
Adds docs/library/generated/ to .gitignore, mirroring the existing docs/modules/generated/ entry one line above.
These files are emitted by sphinx.ext.autosummary on every docs build (autosummary_generate = True in docs/conf.py, driven by the eight :toctree: generated/ directives in docs/library/api.md), so committing them is redundant and the committed copies drift out of sync with what Sphinx actually produces.
Adds custom sphinx.ext.autosummary templates under docs/_templates/autosummary/: class.rst, class_inherited.rst, function.rst.
API class pages now list own methods inline, and inherited methods in a summary table (via Jinja logic in the templates)
Fixes the :template: names in docs/library/api.md to drop .rst (:template: class.rst → :template: class).
Sets numpydoc_show_class_members = False and templates_path = ['_templates'] in docs/_config.yml (and the generated docs/conf.py).
Guards docs/_ext/linkcode.py against property objects so inline members don't crash the build.
properties since removed. will keep this redundancy in place
Misc docstring bug fixes, from doctest warnings
# Conflicts:
#	chainladder/__init__.py
#	chainladder/utils/tests/test_utilities.py
* adding support for multi_index

* fixing test
@henrydingliu henrydingliu merged commit ced6088 into experimental Jun 4, 2026
24 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

❌ Patch coverage is 95.49550% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.28%. Comparing base (0c8a4d9) to head (8a4f172).
⚠️ Report is 37 commits behind head on experimental.

Files with missing lines Patch % Lines
chainladder/__init__.py 95.40% 2 Missing and 2 partials ⚠️
chainladder/core/common.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           experimental     #920      +/-   ##
================================================
+ Coverage         88.08%   88.28%   +0.20%     
================================================
  Files                87       88       +1     
  Lines              5035     5028       -7     
  Branches            658      642      -16     
================================================
+ Hits               4435     4439       +4     
+ Misses              449      444       -5     
+ Partials            151      145       -6     
Flag Coverage Δ
unittests 88.28% <95.49%> (+0.20%) ⬆️

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.

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.

4 participants