TEST: Add tests for base.py#1083
Merged
Merged
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): 25.0% fully typed (2 / 8)
Patch symbol details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1083 +/- ##
==========================================
+ Coverage 89.74% 90.06% +0.32%
==========================================
Files 91 91
Lines 5287 5287
Branches 671 671
==========================================
+ Hits 4745 4762 +17
+ Misses 381 370 -11
+ Partials 161 155 -6
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:
|
henrydingliu
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Addresses uncovered lines in base.py. I left out tests for anything dealing with dask or cupy.
Related GitHub Issue(s)
Additional Context for Reviewers
uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)Note
Low Risk
Changes are almost entirely tests plus minor type hints and a dependency lock constraint; no production logic changes beyond annotations.
Overview
Adds pytest coverage for
TriangleBasebehaviors that were previously untested (dask/cupy paths excluded per PR notes).New tests lock in input sanitization (rows with development before origin trigger a warning and are dropped),
_auto_sparse()(no-op whenAUTO_SPARSEis off; numpy→sparse when size/density thresholds are met),subtriangles, NumPy__array__/__array_function__dispatch (includingTypeErrorfor unhandled or mixed types), and DataFrame interchange construction via a Polars frame.base.pyonly gains typing polish:_auto_sparseis annotated to returnTriangle, and aTYPE_CHECKINGimport forTriangle.uv.lockcaps pandas at<=3.0.3alongside the existing>=2.3.3lower bound.Reviewed by Cursor Bugbot for commit 8651777. Bugbot is set up for automated code reviews on this repo. Configure here.