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
♻️ Refactor last_cell
check & consecutiveness
check in publish()
#167
Conversation
last_cell
check & consecutiveness
check
But this makes impossible to run |
Right, we need to be able to run it in I'll shift things around! |
The important thing to me is that there is no code redundancy in |
But we haven't discussed this and i really don't understand why we need to unify this. Having 2 specific functions is just easier for development and it is not a user facing thing. |
I don't like the approach of one function with specific exceptions for header. |
Yes, yes! It was always two functions, and now they're not coupled together anymore! 😅 |
last_cell
check & consecutiveness
checklast_cell
check & consecutiveness
check in publish()
But now it is impossible to do integrity check without last cell check. |
Take a look at the code and you'll see it's possible! |
I agreed with you immediately: #167 (comment) Apologies for my oversight! |
Ok, but then you need to revert deleting |
Codecov Report
@@ Coverage Diff @@
## main #167 +/- ##
==========================================
+ Coverage 81.10% 81.68% +0.57%
==========================================
Files 17 18 +1
Lines 794 797 +3
==========================================
+ Hits 644 651 +7
+ Misses 150 146 -4
Continue to review full report at Codecov.
|
You mean because the cell that executes the statement has by definition I'd see the The first thing that should happen is to read in the state of the notebook from file in which all cells have execution numbers then, I think. And this should be possible without |
I mean, I'm just testing it! |
Yes, |
Yes, this is indeed the mechanics. I don't really like that one needs to provide
But I also don't really see an alternative other than not calling However, if this really is the only use-case, maybe we should just get rid of the field in So, maybe there is indeed no canonical use case and then the best would probably be to just simplify the API. We can do that in another PR if we want. |
I though on reading stack trace for this at some point, |
I added one for now, which also increases coverage. We can give this another thought. If we can simplify the code & API by dropping a feature that nobody would meaningfully use anyway, we should always do it. The less possibilities for users to make mistakes, the better. The simpler the code, the easier to maintain. |
Thank you. I guess we can drop that, as long as we have |
In any case - the logic almost didn't change in this PR, things got just moved around, the docs are prettier now, coverage increased a bit. The only part where the logic changed is that the consecutiveness check called upon publish doesn't rely on |
The current reason to keep is that if we print it in I'd also be in favor of dropping it. I think the right PR to drop it is when you build in the check within |
Addresses
last_cell
check withconsecutiveness
check #149This also makes the nutshell a lot prettier, as the weird test CI env exceptions disappeared.