-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export SetCell
and GetCell
.
#92
Conversation
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
==========================================
- Coverage 79.54% 78.69% -0.85%
==========================================
Files 8 8
Lines 435 446 +11
==========================================
+ Hits 346 351 +5
- Misses 54 60 +6
Partials 35 35
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good but did make we sure that with making the two of these public, we did not make the API less fool-proof (or easier to shoot yourself in the foot)?
Why is this breaking @adlerjohn? It just adds new features to the API without breaking anything existing. |
This omits the #84 from the picture. The #84 could be explained as "set expected roots once and ensure reconstruction matches them" :
|
I don't see why it would be less foolproof. The alternative is setting cells manually then re-importing the data square, which is way more prone to screwing up.
Ah you're correct, the public API is only additive.
Yep, the resetting done here is for the computed roots.
That would make tests more cumbersome without an additional method to allow setting a cell to |
…l that doesn't have this check.
@Wondertan fixed in 3910c4f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks.
Fixes #83
Fixes #89
Unlike the suggestion in #83 to not reset cached roots, that functionality was kept. The reason is that setting a cell from
nil
to non-nil
does not guarantee that the roots match up with the leaves. The roots actually need to be re-computed to guarantee this, so the cache is cleared every time a cell is set.