[REFACTOR]: Remove repetitive code. Remove dead Python 3.8 code. Add …#857
Merged
Conversation
…missing unit tests.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #857 +/- ##
==========================================
+ Coverage 86.94% 87.16% +0.21%
==========================================
Files 86 86
Lines 4994 5047 +53
Branches 644 648 +4
==========================================
+ Hits 4342 4399 +57
+ Misses 462 457 -5
- Partials 190 191 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1 task
Collaborator
Author
|
Updated to close #862 which was a bug I discovered while trying to write the tests. |
henrydingliu
approved these changes
May 26, 2026
Collaborator
henrydingliu
left a comment
There was a problem hiding this comment.
mostly clean-up of current code. i assume more enhancements will come through #860
Collaborator
|
does it also address #863? |
Collaborator
Author
|
yeah |
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
Remove repetitive code. Remove dead Python 3.8 code. Add missing unit tests.
Repetitive code would be variables like
_DT64_DTYPEwhich then get assigned to something likeDT64_DTYPE. Rewritereset_optionto remove copy-pasted code from initialization.Related GitHub Issue(s)
Partially addresses #856
Closes #862
Additional Context for Reviewers
uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)Note
Medium Risk
DT64_DTYPEnow stores.dtype.nameinstead ofstr(dtype), which could affect datetime casting in core triangle code if the string form differs from before; otherwise changes are mostly internal refactor and test infrastructure.Overview
Refactors
Optionsfrom class-level defaults into instance initialization, documentsget_option/set_option/reset_option, and makesreset_optioncall__init__()instead of duplicating default assignments.DT64_DTYPEis now derived via.dtype.name(dropping module-level_DT64_DTYPE/_ULT_VAL), and__version__always usesimportlib.metadata(Python 3.8importlib_metadatafallback removed).conftest.pycentralizes sample-triangle fixtures in_sample_fixture, yielding triangles with backend setup/teardown instead of repeatingARRAY_BACKENDlogic per fixture.test_utilities.pyexpands coverage for options defaults, get/set consistency,reset_option(with teardown), and deprecation warnings onarray_backend/auto_sparse.Reviewed by Cursor Bugbot for commit 70fe2a5. Bugbot is set up for automated code reviews on this repo. Configure here.