Skip to content
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

Migrating to jupyter-server 2, jupyter_client 7.x #1308

Merged
merged 6 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: voila
channels:
- conda-forge
dependencies:
- jupyterlab=3
- jupyterlab=3.6
- ipywidgets=8
- ipyvolume
- bqplot
- scipy
- ipympl
- xleaflet=0.16.0
- xeus-cling=0.13.0
- python=3.10
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth testing on 3.11 as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah never mind that, forgot we already have a PR for this: #1240


steps:
- uses: actions/checkout@v2
Expand All @@ -31,7 +31,7 @@ jobs:

- name: Create the conda environment
shell: bash -l {0}
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs=18 yarn=1 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" ipykernel

- name: Install dependencies
shell: bash -l {0}
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-10.15]
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -79,7 +79,7 @@ jobs:

- name: Create the conda environment
shell: bash -l {0}
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs=18 yarn=1 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" ipykernel

- name: Install dependencies
shell: bash -l {0}
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2

Expand All @@ -120,11 +120,11 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'

- name: Install dependencies
run: |
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rereunfailures ipywidgets matplotlib traitlets
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures ipywidgets matplotlib traitlets ipykernel
yarn install --network-timeout 100000
python -m pip install ".[test]"
cd tests/test_template
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.7', '3.10']
python: ['3.8', '3.10']
include:
- python: '3.7'
- python: '3.8'
dist: 'voila*.tar.gz'
- python: '3.10'
dist: 'voila*.whl'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"build:prod": "lerna run build:prod",
"build:test": "lerna run build:test",
"clean": "lerna run clean",
"eslint": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
"eslint:check": "eslint . --ext .ts,.tsx,.js,.jsx",
"eslint": "eslint . --ext .ts,.tsx --fix",
"eslint:check": "eslint . --ext .ts,.tsx",
"install": "lerna bootstrap",
"prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
"prettier:check": "prettier --list-different \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/voila/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"@jupyterlab/builder": "^3.0.0",
"@types/node": "^18.8.3",
"@types/node": "~18.8.3",
"babel-loader": "^8.0.5",
"css-loader": "^6.7.2",
"file-loader": "^6.2.0",
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build-backend = "hatchling.build"
name = "voila"
description = "Voilà turns Jupyter notebooks into standalone web applications"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
authors = [
{ name = "Voila Development Team" },
]
Expand All @@ -34,9 +34,9 @@ classifiers = [
"Programming Language :: Python :: 3.10",
]
dependencies = [
"jupyter_client>=6.1.3,<=7.4.1",
"jupyter_client>=7.4.4,<9",
trungleduc marked this conversation as resolved.
Show resolved Hide resolved
"jupyter_core>=4.11.0",
"jupyter_server>=1.18,<2.0.0",
"jupyter_server>=2.0.0,<3",
"jupyterlab_server>=2.3.0,<3",
"nbclient>=0.4.0,<0.8",
"nbconvert>=6.4.5,<8",
Expand Down Expand Up @@ -66,7 +66,6 @@ test = [
"pandas",
"papermill",
"pytest",
"pytest-rerunfailures",
"pytest-tornasync",
]

Expand Down
9 changes: 9 additions & 0 deletions tests/app/shutdown_kernel_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import re
import pytest


@pytest.fixture
def voila_config():
def config(voila_app):
voila_app.tornado_settings["disable_check_xsrf"] = True

return config


async def test_shutdown_handler(http_server_client, base_url):
Expand Down
2 changes: 1 addition & 1 deletion tests/execute_output_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_execute_output():
path = os.path.join(BASE_DIR, "notebooks/output.ipynb")
nb = read(path, NO_CONVERT)
nb_voila = deepcopy(nb)
executenb(nb_voila)
executenb(nb_voila, timeout=30)

widget_states = nb.metadata.widgets[WIDGET_MIME_TYPE_STATE]["state"]
widget_states_voila = nb_voila.metadata.widgets[WIDGET_MIME_TYPE_STATE]["state"]
Expand Down
24 changes: 4 additions & 20 deletions tests/notebooks/output.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
],
"source": [
"import ipywidgets as widgets\n",
"from IPython.display import clear_output\n",
"output1 = widgets.Output()\n",
"output1"
]
Expand Down Expand Up @@ -79,7 +78,6 @@
}
],
"source": [
"import ipywidgets as widgets\n",
"output2 = widgets.Output()\n",
"output2"
]
Expand All @@ -100,8 +98,7 @@
"source": [
"print(\"hi2\")\n",
"with output2:\n",
" print(\"in output2\")\n",
" clear_output(wait=True)"
" print(\"in output2\")\n"
]
},
{
Expand All @@ -126,7 +123,6 @@
}
],
"source": [
"import ipywidgets as widgets\n",
"output3 = widgets.Output()\n",
"output3"
]
Expand All @@ -148,7 +144,6 @@
"print(\"hi3\")\n",
"with output3:\n",
" print(\"hello\")\n",
" clear_output(wait=True)\n",
" print(\"world\")"
]
},
Expand All @@ -174,7 +169,6 @@
}
],
"source": [
"import ipywidgets as widgets\n",
"output4 = widgets.Output()\n",
"output4"
]
Expand All @@ -195,8 +189,7 @@
"source": [
"print(\"hi4\")\n",
"with output4:\n",
" print(\"hello world\")\n",
" clear_output()"
" print(\"hello world\")\n"
]
},
{
Expand All @@ -221,7 +214,6 @@
}
],
"source": [
"import ipywidgets as widgets\n",
"output5 = widgets.Output()\n",
"output5"
]
Expand All @@ -234,8 +226,7 @@
"source": [
"print(\"hi5\")\n",
"with output5:\n",
" display(\"hello world\") # this is not a stream but plain text\n",
"clear_output()"
" display(\"hello world\") # this is not a stream but plain text\n"
]
},
{
Expand All @@ -260,7 +251,6 @@
}
],
"source": [
"import ipywidgets as widgets\n",
"output_outer = widgets.Output()\n",
"output_inner = widgets.Output()\n",
"output_inner"
Expand Down Expand Up @@ -296,13 +286,7 @@
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"with output_inner:\n",
" print('in inner')\n",
" with output_outer:\n",
" print('in outer')\n",
" print('also in inner')"
]
"source": []
},
{
"cell_type": "code",
Expand Down
Loading