Repository navigation
Conversation
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): 4.0% fully typed (1 / 25)
Patch symbol details
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1455 +/- ##
==========================================
+ Coverage 94.10% 94.14% +0.03%
==========================================
Files 96 96
Lines 5835 5909 +74
Branches 739 758 +19
==========================================
+ Hits 5491 5563 +72
- Misses 222 223 +1
- Partials 122 123 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b5b0139. Configure here.
|
@priyam0k thanks for putting this together. my recommendation is to add it to the axis stack. i say this because, things like in the current implementation, it's easy to walk into annoying corner cases (something like my only other comment is that you can probably break out a |
PR #1304 and the active axis stack (#1303 through #1454) focus on establishing property descriptors and deprecating legacy dimensions, without introducing axis set/arithmetic operations yet. Also, Triangle.add operates on 4D numeric arrays for tensor arithmetic, whereas Styler is 2D presentation for display DataFrames where patterns carry string interval headers like 12-24. Centralizing interval parsing into TriangleAxis once the axis stack expands makes sense, but keeping it localized here avoids blocking Styler concatenation on future axis features. Looping in @genedan in case he has thoughts on timing.
The reverse widening case (concatenating a shorter styler with a longer one) is now resolved and covered with tests. Snapshotting the styling context on the parent styler before expanding columns prevents shape mismatch errors on existing highlights during render.
Broke out _pad_columns and _snapshot_context helper methods to flatten Styler.concat and eliminate the nested if blocks. |
|
sounds good. i didn't see gene already assigned this before leaving my comment. will let gene take over from here. |

Summary of Changes
Enables Styler.concat() to vertically stack styled triangles, link ratios, and pattern selections into a single exhibit:
Related GitHub Issue(s)
Closes #1336
Part of #1331
AI/LLM Usage
Used basic model for initial unit test drafting and lint checks.
Additional Context for Reviewers
Standard pandas Styler.concat requires identical column names. This enables combining loss triangles with link ratios (such as 12-24) and CDF patterns while keeping individual formats and highlights intact.
Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist
Note
Low Risk
Presentation-layer changes to
Stylerwith extensive tests; no auth, persistence, or core reserving math paths.Overview
Adds
Styler.concat()so users can vertically stack styled loss triangles, link ratios, and development patterns (LDF/CDF) into one HTML/LaTeX exhibit without requiring identical pandas column names.When column labels differ but development lags align, the implementation compares starting development periods (including pattern intervals like
12-24vs12-Ult), pads missing columns with blanks, and snapshots/restores pre-computed style contexts so highlights and formats survive widening without shape errors. It validates index depth, valuation vs development mode, development grain, and lag compatibility; copies the appended styler so callers are not mutated.Includes broad pytest coverage (chaining, widening, style preservation, error cases) and a Concatenating Stylers section in the style user guide.
Reviewed by Cursor Bugbot for commit 4f3118a. Bugbot is set up for automated code reviews on this repo. Configure here.