- What is the purpose of
src/client/gather/*.ts
- What is excution Slicer
-
Is nodebook the object that carries information about everything (i.e. considered the session object)
-
What is
InteractiveBaseininteractiveBase.ts. -
Explain
IInteractiveWindowListener
- Who sends and who receives.
- Who fires the event & who handles the responses.
-
How is this different from
IWebPanelMessageListener. This is used to wire up post office. One per webview host (top level) -
What is the
IInteractiveBaseinterface Dervied by interactive windows. -
What is the difference betwee
IInteractiveBaseandIInteractiveWindowI.e. why the inheritance and why not just haveIInteractiveWindow.
- IInteractiveWindow - has add code (this is the interactive window, not the native editor)
- IInteractiveBase - no add code (this is the base for both native editor & interactive window).
-
What is the
InteractiveWindowclass, where is this used. I.e. what UI element does this relate to? -
What is the difference between
InteractiveWindowandNativeEditor. -
Where is
NativeEditorProviderused, i.e. who calls this? -
Why not close then open Here user opens a doc, then we open our doc, then we switch and close it and our doc is dispalyed. There some flickering. Why not just close the users doc and open ours?
const contents = document.getText();
const uri = document.uri;
// Open our own editor.
await this.open(uri, contents);
// Then switch back to the ipynb and close it.
// If we don't do it in this order, the close will switch to the wrong item
await this.documentManager.showTextDocument(document);
const command = 'workbench.action.closeActiveEditor';
await this.cmdManager.executeCommand(command);-
Please explain and go through
InteractiveWindowclass. Some of the key methods. -
Get an understanding of Jupyter session manager, etc. How are the sessions created, managed and how are messages sent and received.
-
What is the difference between
JupyterandNotebook. E.g. why is the interface namedIJupyterDebuggerand notINotebookDebugger. Trying to understand whether there was a reason or whether they are both similar and can be used interchangeably. I.e. wouldINotebookDebuggerstill mean the same. -
What is the relationship between a
JupyterSessionandNotebook. -
What are
notebookFilesin theJupyterSessionclass.private notebookFiles: Contents.IModel[] = [];
-
When it
waitForPromisetimes out, the promise isn't rejected! However this code assumes it is. Also it doesn't make sense, when iseundefined? Theif (!e)implies thatecan be undefined.
// Wait for this kernel promise to happen
try {
return await waitForPromise(kernelPromise, timeout);
} catch (e) {
if (!e) {
// We timed out. Throw a specific exception
throw new JupyterKernelPromiseFailedError(errorMessage);
}
throw e;
}- This can be dangerous.
await waitForPromise(session.shutdown(), 1000);Basically, its possible the shutdown will timeout. hence code will continue.
However shutdown will continue to run and it will run and could throw an exception later on, and that won't be handled, as code has moved on.
-
In
JupyterSession.shutdownwhy do we need to ensure the session is running? I.e. why callsessionManager.refreshRunning? -
JupyterSession.shutdownSessionis best turned into a static method. -
Why not log the current status of the kernel. This way we have more context of what's going on and we can try to figure out the delays (timeouts) on CI.
throw new JupyterWaitForIdleError(localize.DataScience.jupyterLaunchTimedOut());-
What is the purpose of
JupyterSession.waitForIdleOnSession? Is this to wait for the session to be idle so we can send commands to it? I.e. why do we need to wait for idle, or another way of asking this question is, what if we didn't want and removed this wait? -
When running some code that's required for extension (e.g. setting backgrounds for matplotlib, getting python version,etc). In such cases they are executed as silent without the history. Some of them don't require a result. E.g. setting the background colors for matplot lib. Why don't we just ignore that (we can use
silentin the request. Today we're usingstore_historyfor these). Any reason, or just to avoid having to set both of them! -
Do we maintain our own cell counter (history). Is this mapped to the one coming form jupyter.
-
Do we shutdown kernels when closing VS Code? If not we have a lot of these orphaned processes that chew up memory and CPU
-
Creation of kernel specs. When and why do we do this?