-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Support for arbitrary notebook kernel execution #179258
Conversation
Will need to add some tests, but I would like to get some early feedback before I spend too much time on this approach. Perhaps it could be merged into a single event argument, not sure that increases readability or makes it more complicated. |
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.
Of the internal stuff (NotebookExecutionStateService and stuff that references it) do you think some of that could be made to be shared between "cell executions" and "notebook executions", rather than duplicating everything into separate events and methods? Or do you think that would make it more awkward to deal with?
It would make sense to me to basically have a single concept of execution overall, a single listener that you have to listen to, which fires updates about executions, and the execution might be for a cell or it might be for the notebook as a whole.
src/vs/workbench/services/extensions/common/extensionsApiProposals.ts
Outdated
Show resolved
Hide resolved
I agree, thats exactly what I wanted to do, but wasn't sure about it. |
5775bf9
to
262f98e
Compare
@roblourens merged into a single event, thats all. |
src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.ts
Outdated
Show resolved
Hide resolved
* When {@linkcode NotebookExecution.start start()} is called on the execution task, it causes the Notebook to enter a executing state . | ||
* When {@linkcode NotebookExecution.end end()} is called, it enters the idle state. | ||
*/ | ||
export interface NotebookExecution { |
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.
I suppose normally I'd say this should start automatically when you create it, and then be disposable, but we should probably use start/end just to match the cell execution pattern.
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.
Yup, thats the pattern is tried to stick with,
I thought of just returning a IDisposable
instead of NotebookExecution
, that was much simpler, but didn't seem to line up with the cell exec code.
Good stuff, thanks for writing all of this! |
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.
Looks great. It's a good fix and worth bringing to the next API sync meeting
e85c23c
to
a81c11e
Compare
@roblourens @rebornix Please re-review, added testes, and had to get the latest stuff from main |
For microsoft/vscode-jupyter#13275