You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run npm install @vscode/jupyter-extension@proposed to install the typedef of the Jupyter Extension API
Review the Kernel API
Review the API Jupyter.kernels, Jupyter.kernels.getKernel, <Kernel>.executeCode
Verify Access to Kernel API
First open a notebook, run code against a Python kernel (local/remote)
Use the API method Jupyter.kernels.getKernel(< URI of notebook > to get the kernel
Verify the user is prompted to grant access to this kernel
Click cancel.
Verify a kernel is not returned in the API call
Select the command Manage Access to Jupyter Kernels
Verify your extension is displayed in the list
Verify your extension is NOT ticked
Tick your extension from the list
Go back to your extension code and invoke the getKernel API again
Verify a prompt is not displayed
Verify a Kernel instance is returned via the API
Select the command Manage Access to Jupyter Kernels
Verify your extension is displayed in the list
Verify your extension is ticked
Un-Tick your extension from the list
Go back to your extension code and invoke the getKernel API again
Verify a prompt is not displayed
Verify a Kernel instance is NOT returned via the API
Reload VS Code
Run code against the open notebook
Verify calling getKernel from the extension will display the prompt
Click OK
Verify the Kernel instance is returned
Reload VS Code
Run code against the open notebook
Verify calling getKernel from the extension will NOT display the prompt
Verify the Kernel instance is returned
Verify Execution of Code to Kernel API
First open a notebook, run code against a Python kernel (local/remote)
Access the Kernel via the getKernel API call
Verify you can execute code such as print("Hello World") via the API and you get the output back
Verify you can execute code such as for i in range(10):\n import time\n time.sleep(1)\n print(i) via the API and you get 10 outputs back one by one (i.e. verify outputs are streamed as they arrive)
Verify code is executed against the right Kernel when you have two notebooks with different kernels.
The text was updated successfully, but these errors were encountered:
Refs: #14669
Complexity: 5
Create Issue
Pre-Requisites
Steps
yo code
or use the sample Sample extension using Jupyter Execution API vscode-extension-samples#923npm install @vscode/jupyter-extension@proposed
to install the typedef of the Jupyter Extension APIReview the Kernel API
Jupyter.kernels
,Jupyter.kernels.getKernel
,<Kernel>.executeCode
Verify Access to Kernel API
Jupyter.kernels.getKernel(< URI of notebook >
to get the kernelManage Access to Jupyter Kernels
Tick
your extension from the listgetKernel
API againManage Access to Jupyter Kernels
Un-Tick
your extension from the listgetKernel
API againgetKernel
from the extension will display the promptgetKernel
from the extension will NOT display the promptVerify Execution of Code to Kernel API
getKernel
API callprint("Hello World")
via the API and you get the output backfor i in range(10):\n import time\n time.sleep(1)\n print(i)
via the API and you get 10 outputs back one by one (i.e. verify outputs are streamed as they arrive)The text was updated successfully, but these errors were encountered: