Skip to content

FEAT: Initialize triangle from dict.#706

Merged
kennethshsu merged 1 commit into
casact:mainfrom
genedan:gd_dict
Apr 29, 2026
Merged

FEAT: Initialize triangle from dict.#706
kennethshsu merged 1 commit into
casact:mainfrom
genedan:gd_dict

Conversation

@genedan
Copy link
Copy Markdown
Collaborator

@genedan genedan commented Apr 23, 2026

Enables the initialization of a triangle via data supplied in a dictionary. Closes #701.


Note

Low Risk
Low risk: change is limited to accepting dict input by converting it to a pandas DataFrame, plus a unit test to confirm parity with existing DataFrame initialization.

Overview
Triangle now accepts a Python dict for the data argument by converting it to a pandas DataFrame during initialization.

Adds a regression test (test_triangle_init_from_dict) asserting a dict-backed triangle is equal to one built from an equivalent DataFrame, and updates the constructor docstring/type hints accordingly.

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

@genedan genedan requested a review from henrydingliu April 23, 2026 02:47
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.13%. Comparing base (6cb4aab) to head (1b0a7a8).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #706   +/-   ##
=======================================
  Coverage   85.12%   85.13%           
=======================================
  Files          85       85           
  Lines        4909     4911    +2     
  Branches      629      630    +1     
=======================================
+ Hits         4179     4181    +2     
  Misses        521      521           
  Partials      209      209           
Flag Coverage Δ
unittests 85.13% <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 Sentry.
📢 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.

@kennethshsu
Copy link
Copy Markdown
Collaborator

You are so fast @genedan, I was just about to work on this one😅

@kennethshsu kennethshsu merged commit 7591c61 into casact:main Apr 29, 2026
8 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.

Initialize Triangle via Python dictionary

2 participants