-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
Description
Refs: #7675
- windows @sbatten
- macOS @paulacamargo25
- linux @joaomoreno
Complexity: 4
We've upgraded our internal library we use for communicating with kernels in the Jupyter extension to the latest jupyter lab services API
This version of the npm module looks to be a complete rewrite so we'd like to regression test all forms of communication with jupyter kernels.
Setup steps:
- Install some version of python
- Make sure you have pip installed
- Install Jupyter extension from marketplace (it is updated nightly, so it will have this month's changes in it)
- Install insiders Python extension
Test steps: (repeat multiple times)
- Create a python environment using either venv or conda. Alternatively you can use an existing environment.
- If using conda, try creating environments with different versions of python
- Open VS code in a new folder (if using venv, make sure the venv you created is located at the same root)
- Create a python file like so:
# %%
print('run cell')
- A bunch of code lenses should appear.
- Try using all of them
- You should be prompted to install ipykernel (if you haven't already)
- Try restarting the kernel
- Run a cell again, make sure it runs
- Run the following cell
import sys
!{sys.executable} -m pip install tqdm
- Add another cell like so (through the input box or the python file)
# %%
from tqdm import trange
import time
for i in trange(100):
time.sleep(0.1)
- Make sure you can interrupt running of this cell, by clicking
Interrupt
at the top of theInteractive-1
editor. - After interrupting make sure the kernel is still usable
- Using
File | New File ...
create a jupyter notebook - Try the interrupt code in the notebook too
- Try restarting the kernel in the notebook too.
- Opening your settings.json and add this hidden setting:
"jupyter.disableZMQSupport": true
- Rerun the steps above with that setting
Testing remote: (doesn't need to be done multiple times)
- On one of the venvs or conda environments you created before, install full jupyter
- In a command prompt, switch to your workspace folder
- Activate your venv/conda environment
- Run
jupyter notebook
. It should output something like so:
[I 12:12:55.526 NotebookApp] Serving notebooks from local directory: D:\Source\Testing_3
[I 12:12:55.526 NotebookApp] Jupyter Notebook 6.2.0 is running at:
[I 12:12:55.526 NotebookApp] http://localhost:8888/?token=44a6967a96e31890585f51b1d64e50811917ba5d9d555ab3
[I 12:12:55.526 NotebookApp] or http://127.0.0.1:8888/?token=44a6967a96e31890585f51b1d64e50811917ba5d9d555ab3
[I 12:12:55.527 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:12:55.675 NotebookApp]
To access the notebook, open this file in a browser:
file:///C:/Users/aku91/AppData/Roaming/jupyter/runtime/nbserver-10188-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=44a6967a96e31890585f51b1d64e50811917ba5d9d555ab3
or http://127.0.0.1:8888/?token=44a6967a96e31890585f51b1d64e50811917ba5d9d555ab3
- Start VS code in the same workspace folder
- Run this command:
- Pick
Existing
on the first quick pick - Copy the URL from your terminal into the second quick pick.
- Restart VS code
- Run the steps above but use the default 'python 3' kernel (debugging doesn't work just yet)
- Make sure interrupt and restart tasks work