-
Notifications
You must be signed in to change notification settings - Fork 337
Ensure executionCount is incremented for cells submitted from interactive window input box #7245
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
Conversation
…tive window input box
Codecov Report
@@ Coverage Diff @@
## main #7245 +/- ##
======================================
+ Coverage 62% 64% +2%
======================================
Files 360 360
Lines 22541 22520 -21
Branches 3400 3399 -1
======================================
+ Hits 14064 14611 +547
+ Misses 7303 6613 -690
- Partials 1174 1296 +122
|
@@ -136,6 +138,9 @@ export class Kernel implements IKernel { | |||
public async executeCell(cell: NotebookCell): Promise<void> { | |||
const stopWatch = new StopWatch(); | |||
const notebookPromise = this.startNotebook({ disableUI: false, document: cell.notebook }); | |||
if (cell.notebook.notebookType === InteractiveWindowView) { |
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.
This is a very weird pr, no part of the code makes me think that any of these changes will update the execution count
My only guess is that when we add a cell using the cell hash provided it's a real Block of code, else it's treated as silent and we end up with no execution count.
Is that right?
If that's the case then cell hash provided does a whole lot more than it seems to.
No need to change this, but I would have never guessed, and to me is a pretty weird way to wire things up.
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.
Yeah the executionCount is state that's maintained inside the cellHashProvider. I agree that it's pretty opaque. FWIW, this used to be done in an INotebookExecutionLogger, I think my change to explicitly call addCellHash made it more explicit that the cellHashProvider is getting called, so the code now scans funny.
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.
.
Fix #7156
We were previously only incrementing the executionCounts for interactive cells submitted from a Python file. Need to do this for cells submitted from the interactive window input box too. No news entry because this was caused by 2b3fdb7, which was checked in between stable releases