Skip to content

Commit 1d32d5f

Browse files
authored
Merge branch 'main' into reconnect-kernels
2 parents 8df59ad + db29c7a commit 1d32d5f

17 files changed

+212
-161
lines changed

.github/workflows/build-test.yml

Lines changed: 59 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -301,44 +301,50 @@ jobs:
301301
isScheduled: ''
302302
include:
303303
# Mandatory tests
304-
# - jupyterConnection: remote //https://github.com/microsoft/vscode-jupyter/issues/16851
305-
# python: python
306-
# pythonVersion: '3.10'
307-
# tags: '^[^@]+$|@mandatory'
308-
# os: ubuntu-latest
309-
# ipywidgetsVersion: ''
304+
- jupyterConnection: remote
305+
python: python
306+
pythonVersion: '3.10'
307+
tags: '^[^@]+$|@mandatory'
308+
os: ubuntu-latest
309+
ipywidgetsVersion: ''
310310
# - jupyterConnection: remote
311311
# python: python
312312
# pythonVersion: '3.10'
313313
# packageVersion: 'prerelease'
314314
# tags: '^[^@]+$|@mandatory'
315315
# os: ubuntu-latest
316316
# ipywidgetsVersion: ''
317-
# - jupyterConnection: web //https://github.com/microsoft/vscode-jupyter/issues/16851
318-
# python: python
319-
# pythonVersion: '3.10'
320-
# tags: '^[^@]+$|@mandatory'
321-
# os: ubuntu-latest
322-
# ipywidgetsVersion: ''
317+
- jupyterConnection: web
318+
python: python
319+
pythonVersion: '3.10'
320+
tags: '^[^@]+$|@mandatory'
321+
os: ubuntu-latest
322+
ipywidgetsVersion: ''
323323
- jupyterConnection: raw
324324
python: python
325325
pythonVersion: '3.10'
326326
tags: '^[^@]+$|@mandatory'
327327
os: windows-latest
328328
ipywidgetsVersion: ''
329-
# IPyWidgets 8
329+
# IPyWidgets 7 & 8
330330
- jupyterConnection: raw
331331
python: python
332332
pythonVersion: '3.10'
333333
tags: '@widgets'
334334
os: ubuntu-latest
335-
ipywidgetsVersion: '8'
335+
ipywidgetsVersion: '7'
336+
- jupyterConnection: raw
337+
python: python
338+
pythonVersion: '3.10'
339+
tags: '@widgets'
340+
os: ubuntu-latest
341+
ipywidgetsVersion: ''
336342
- jupyterConnection: remote
337343
python: python
338344
pythonVersion: '3.10'
339345
tags: '@widgets'
340346
os: ubuntu-latest
341-
ipywidgetsVersion: '8'
347+
ipywidgetsVersion: ''
342348
# Conda
343349
- jupyterConnection: raw
344350
python: conda
@@ -361,12 +367,12 @@ jobs:
361367
os: ubuntu-latest
362368
ipywidgetsVersion: ''
363369
# Misc
364-
# - jupyterConnection: remote //https://github.com/microsoft/vscode-jupyter/issues/16851
365-
# python: python
366-
# pythonVersion: '3.10'
367-
# tags: '@kernelCore'
368-
# os: ubuntu-latest
369-
# ipywidgetsVersion: ''
370+
- jupyterConnection: remote
371+
python: python
372+
pythonVersion: '3.10'
373+
tags: '@kernelCore'
374+
os: ubuntu-latest
375+
ipywidgetsVersion: ''
370376

371377
steps:
372378
- name: Checkout
@@ -425,16 +431,16 @@ jobs:
425431
# Caching (https://github.com/actions/cache/blob/main/examples.md#python---pip
426432
- name: Cache pip on linux
427433
uses: actions/cache@v4
428-
if: matrix.os == 'ubuntu-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '8'
434+
if: matrix.os == 'ubuntu-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '7'
429435
with:
430436
path: ~/.cache/pip
431-
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-requirements.txt')}}
437+
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-ipywidgets7-requirements.txt')}}
432438
restore-keys: |
433439
${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-7
434440
435441
- name: Cache pip on linux
436442
uses: actions/cache@v4
437-
if: matrix.os == 'ubuntu-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '8'
443+
if: matrix.os == 'ubuntu-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '7'
438444
with:
439445
path: ~/.cache/pip
440446
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-ipywidgets8-requirements.txt')}}
@@ -443,16 +449,16 @@ jobs:
443449
444450
- name: Cache pip on mac
445451
uses: actions/cache@v4
446-
if: matrix.os == 'macos-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '8'
452+
if: matrix.os == 'macos-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '7'
447453
with:
448454
path: ~/Library/Caches/pip
449-
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-requirements.txt')}}
455+
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-ipywidgets7-requirements.txt')}}
450456
restore-keys: |
451457
${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-7
452458
453459
- name: Cache pip on mac
454460
uses: actions/cache@v4
455-
if: matrix.os == 'macos-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '8'
461+
if: matrix.os == 'macos-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '7'
456462
with:
457463
path: ~/Library/Caches/pip
458464
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-ipywidgets8-requirements.txt')}}
@@ -461,16 +467,16 @@ jobs:
461467
462468
- name: Cache pip on windows
463469
uses: actions/cache@v4
464-
if: matrix.os == 'windows-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '8'
470+
if: matrix.os == 'windows-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '7'
465471
with:
466472
path: ~\AppData\Local\pip\Cache
467-
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-requirements.txt')}}
473+
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-ipywidgets7-requirements.txt')}}
468474
restore-keys: |
469475
${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-7
470476
471477
- name: Cache pip on windows
472478
uses: actions/cache@v4
473-
if: matrix.os == 'windows-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '8'
479+
if: matrix.os == 'windows-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '7'
474480
with:
475481
path: ~\AppData\Local\pip\Cache
476482
key: ${{ runner.os }}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('build/venv-test-ipywidgets8-requirements.txt')}}
@@ -517,30 +523,29 @@ jobs:
517523
# debugpy is not shipped, only installed for local tests.
518524
# In production, we get debugpy from python extension.
519525
- name: Install Python Libs
520-
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '8' && matrix.tags != '@notebookPerformance'
526+
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '7' && matrix.tags != '@notebookPerformance'
521527
run: |
522528
python --version
523529
python -c "import sys;print(sys.executable)"
524-
python -m pip --disable-pip-version-check install -r build/venv-test-requirements.txt
530+
python -m pip --disable-pip-version-check install -r build/venv-test-ipywidgets7-requirements.txt
525531
python -m pip install packaging # required for installing debugpy
532+
python -m pip install --upgrade notebook
526533
python ./pythonFiles/install_debugpy.py
527534
python -m ipykernel install --user
528535
529536
- name: Install Jupyter Notebook and Lab
530537
if: matrix.jupyterConnection == 'remote' || matrix.jupyterConnection == 'web'
531538
run: |
532-
python -m pip install jupyterlab notebook
539+
python -m pip install --upgrade jupyterlab notebook
533540
534541
- name: Install Python Libs (IPyWidget 8)
535-
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion == '8' && matrix.tags != '@notebookPerformance'
542+
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.ipywidgetsVersion != '7' && matrix.tags != '@notebookPerformance'
536543
run: |
537544
python --version
538545
python -c "import sys;print(sys.executable)"
539-
python -m pip install ipywidgets -U
540546
python -m pip --disable-pip-version-check install -r build/venv-test-ipywidgets8-requirements.txt
541547
python -m pip install packaging # required for installing debugpy
542548
python ./pythonFiles/install_debugpy.py
543-
python -m pip install ipywidgets -U
544549
python -m ipykernel install --user
545550
546551
- name: Install Python Libs for conda
@@ -551,20 +556,20 @@ jobs:
551556
python -m pip install packaging # required for installing debugpy
552557
python ./pythonFiles/install_debugpy.py
553558
554-
- name: Install matplotlib widgets into user and system paths
555-
if:
556-
matrix.os == 'ubuntu-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.packageVersion != 'prerelease' && matrix.tags != '^[^@]+$|@mandatory' && matrix.tags != '@notebookPerformance'
557-
# This test will ensure widgets work when installed in 3 places
558-
# 1. In python environments site-packages folder (we have other 3rd party widgets in the python env)
559-
# 2. In user's home folder (ipympl will be installed in there)
560-
# 3. In system folder (all users) (matplotlib will be installed in there)
561-
run: |
562-
# Uninstall ipympl from the sys prefix folder and ensure the widget scripts are installed
563-
# into the user directory.
564-
export PYTHON_EXECUTABLE=$(which python)
565-
echo $PYTHON_EXECUTABLE
566-
python -m jupyter nbextension uninstall --sys-prefix --py ipympl
567-
sudo $PYTHON_EXECUTABLE -m jupyter nbextension install --system --py ipympl
559+
# - name: Install matplotlib widgets into user and system paths
560+
# if:
561+
# matrix.os == 'ubuntu-latest' && matrix.python != 'conda' && matrix.python != 'noPython' && matrix.packageVersion != 'prerelease' && matrix.tags != '^[^@]+$|@mandatory' && matrix.tags != '@notebookPerformance'
562+
# # This test will ensure widgets work when installed in 3 places
563+
# # 1. In python environments site-packages folder (we have other 3rd party widgets in the python env)
564+
# # 2. In user's home folder (ipympl will be installed in there)
565+
# # 3. In system folder (all users) (matplotlib will be installed in there)
566+
# run: |
567+
# # Uninstall ipympl from the sys prefix folder and ensure the widget scripts are installed
568+
# # into the user directory.
569+
# export PYTHON_EXECUTABLE=$(which python)
570+
# echo $PYTHON_EXECUTABLE
571+
# python -m jupyter nbextension uninstall --sys-prefix --py ipympl
572+
# sudo $PYTHON_EXECUTABLE -m jupyter nbextension install --system --py ipympl
568573

569574
# Run npm install (we need chrome to get downloaded)
570575
- name: npm ci
@@ -615,11 +620,13 @@ jobs:
615620

616621
- name: Create Virtual Env for Tests
617622
uses: ./.github/actions/create-venv-for-tests
618-
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.os != 'windows-latest' && matrix.jupyterConnection != 'remote' && matrix.tags != '^[^@]+$|@mandatory' && matrix.ipywidgetsVersion != '8' && matrix.jupyterConnection != 'web' && matrix.jupyterConnection != 'remote' && matrix.tags != '@debugger' && matrix.tags != '@webview|@export|@lsp|@variableViewer' && matrix.tags != '@notebookPerformance'
623+
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.os != 'windows-latest' && matrix.jupyterConnection != 'remote' && matrix.tags != '^[^@]+$|@mandatory' && matrix.ipywidgetsVersion == '7' && matrix.jupyterConnection != 'web' && matrix.jupyterConnection != 'remote' && matrix.tags != '@debugger' && matrix.tags != '@webview|@export|@lsp|@variableViewer' && matrix.tags != '@notebookPerformance'
624+
with:
625+
IPyWidgetVersion: '7'
619626

620627
- name: Create Virtual Env for Tests (ipywidgets 8)
621628
uses: ./.github/actions/create-venv-for-tests
622-
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.os != 'windows-latest' && matrix.jupyterConnection != 'remote' && matrix.tags != '^[^@]+$|@mandatory' && matrix.ipywidgetsVersion == '8' && matrix.jupyterConnection != 'web' && matrix.jupyterConnection != 'remote' && matrix.tags != '@debugger' && matrix.tags != '@webview|@export|@lsp|@variableViewer' && matrix.tags != '@notebookPerformance'
629+
if: matrix.python != 'conda' && matrix.python != 'noPython' && matrix.os != 'windows-latest' && matrix.jupyterConnection != 'remote' && matrix.tags != '^[^@]+$|@mandatory' && matrix.ipywidgetsVersion != '7' && matrix.jupyterConnection != 'web' && matrix.jupyterConnection != 'remote' && matrix.tags != '@debugger' && matrix.tags != '@webview|@export|@lsp|@variableViewer' && matrix.tags != '@notebookPerformance'
623630
with:
624631
IPyWidgetVersion: '8'
625632

.vscode-test.mjs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import fs from 'fs';
44
import { defineConfig } from '@vscode/test-cli';
55
import { fileURLToPath } from 'url';
6-
import { dirname } from 'path';
6+
import { dirname, join } from 'path';
77

88
const __filename = fileURLToPath(import.meta.url);
99
const __dirname = dirname(__filename);
@@ -15,30 +15,38 @@ async function generateConfig() {
1515
? `${venvFolder}/Scripts/python.exe`
1616
: `${venvFolder}/bin/python`
1717
: '';
18-
18+
const workspaceFolder = join(__dirname, 'src', 'test', 'datascience');
1919
/** @type {import('@vscode/test-cli').TestConfiguration} */
2020
let config = {
2121
label: 'Extension Test',
2222
files: ['out/**/*.vscode.test.js', 'out/**/*.vscode.common.test.js'],
2323
version: 'insiders',
2424
srcDir: 'src',
25-
workspaceFolder: `${__dirname}/src/test/datascience`,
26-
launchArgs: ['--enable-proposed-api'],
25+
workspaceFolder,
26+
launchArgs: [workspaceFolder, '--enable-proposed-api'],
2727
env: {
2828
VSC_JUPYTER_FORCE_LOGGING: '1',
29+
// VSC_JUPYTER_REMOTE_NATIVE_TEST: 'true',
30+
// VSC_JUPYTER_NON_RAW_NATIVE_TEST: 'false',
31+
// VSC_JUPYTER_CI_TEST_GREP: '@widgets',
2932
CI_PYTHON_PATH: pythonPath,
3033
XVSC_JUPYTER_INSTRUMENT_CODE_FOR_COVERAGE: '1',
3134
XVSC_JUPYTER_INSTRUMENT_CODE_FOR_COVERAGE_HTML: '1', //Enable to get full coverage repor (in coverage folder).
3235
VSC_JUPYTER_EXPOSE_SVC: '1'
3336
},
34-
installExtensions: ['ms-python.vscode-pylance@prerelease']
37+
installExtensions: [
38+
'ms-toolsai.jupyter-renderers',
39+
'ms-python.vscode-python-envs',
40+
'ms-python.python',
41+
'ms-python.vscode-pylance@prerelease'
42+
]
3543
};
3644

3745
config.mocha = {
3846
ui: 'tdd',
3947
color: true,
4048
timeout: 25000,
41-
preload: `${__dirname}/out/platform/ioc/reflectMetadata.js`
49+
preload: [`${__dirname}/out/platform/ioc/reflectMetadata.js`, `${__dirname}/out/test/common.test.require.js`]
4250
};
4351

4452
return config;

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
"bin": true,
1010
"**/__pycache__": true,
1111
"**/node_modules": false,
12-
".vscode-test": true,
13-
".vscode test": true,
14-
".venv": true,
1512
"**/.pytest_cache/**": true,
1613
"languageServer.*/**": true,
1714
"**/.mypy_cache/**": true,
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# List of requirements for conda environments that cannot be installed using conda
22
# Pinned per ipywidget 8 support: https://github.com/microsoft/vscode-jupyter/issues/11598
3-
ipysheet==0.5.0
43
matplotlib
54
ipympl

build/conda-test-requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- ipywidgets=7.7.2 # Pinned per ipywidget 8 support: https://github.com/microsoft/vscode-jupyter/issues/11598
6+
- ipywidgets
77
- pandas
88
- nbformat
99
- jinja2

build/venv-test-requirements.txt renamed to build/venv-test-ipywidgets7-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ jupyter
77
# Pinned per ipywidget 8 support: https://github.com/microsoft/vscode-jupyter/issues/11598
88
ipywidgets==7.7.2
99
anywidget
10-
ipysheet==0.5.0
1110
matplotlib
1211
ipympl

build/venv-test-ipywidgets8-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ jupyter
66
# List of requirements for conda environments that cannot be installed using conda
77
ipywidgets
88
anywidget
9-
ipysheet==0.5.0
109
matplotlib
1110
ipympl

0 commit comments

Comments
 (0)