Skip to content

docs: add Triangle.heatmap examples (#704) - #1210

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

docs: add Triangle.heatmap examples (#704)#1210
henrydingliu merged 2 commits into
casact:mainfrom
EKtheSage:docs/704-display-examples

Conversation

@EKtheSage

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Add doctest Examples for Triangle.heatmap in chainladder/core/display.py.
  • Cover the default colormap, an alternate cmap, and the multi-dimensional ValueError.

Related GitHub Issue(s)

Additional Context for Reviewers

Bite-sized core-module follow-up for #704. Companions: slicing #1208, I/O #1209.

HTML output is asserted by type and by the presence of background-color rather than dumping the full markup.

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

Co-authored-by: Cursor <cursoragent@cursor.com>
@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.26%. Comparing base (52e655b) to head (1ff506c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1210   +/-   ##
=======================================
  Coverage   91.26%   91.26%           
=======================================
  Files          91       91           
  Lines        5401     5401           
  Branches      691      691           
=======================================
  Hits         4929     4929           
  Misses        338      338           
  Partials      134      134           
Flag Coverage Δ
unittests 91.26% <ø> (ø)

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 think the average user will want to see actual heatmaps. It would be more valuable to not add any examples in the docstring instead, just a link to a notebook in the docs that actually have heatmap.

Doctest cannot render a background gradient; the Triangle notebook already shows one.

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

Copy link
Copy Markdown
Contributor Author

Dropped the HTML doctests. heatmap returns IPython HTML, so those examples could not show the gradient.

The docstring now points at the existing rendered example in the Triangle user guide (triangle.link_ratio.heatmap()).

@henrydingliu henrydingliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

validated link via PR build

@henrydingliu

Copy link
Copy Markdown
Member

@EKtheSage thanks!

@henrydingliu
henrydingliu merged commit 6fee2d4 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