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

Backport PR #1334 on branch 0.3.x (Do not clean up resources after execution) #1336

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
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,40 @@ jobs:
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge

- 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==16.19.0 yarn==1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"

- name: Install Dependencies
shell: bash -l {0}
run: |
python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.10

- name: Install the Voilà Preview JupyterLab extension
shell: bash -l {0}
run: |
python -m pip install .

- name: Check the extensions are installed
shell: bash -l {0}
run: |
jupyter nbextension list 2>&1 | grep -ie "voila/extension.*enabled" -
jupyter labextension list 2>&1 | grep -ie "@voila-dashboards/jupyterlab-preview.*enabled.*ok" -
jupyter server extension list 2>&1 | grep -ie "voila\.server_extension.*enabled" -

- name: Browser check
shell: bash -l {0}
run: |
python -m jupyterlab.browser_check

- name: Lint
shell: bash -l {0}
run: |
jlpm
jlpm run eslint:check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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 flake8 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==16.19.0 yarn==1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"

- name: Install dependencies
shell: bash -l {0}
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:


test-osx:

runs-on: ${{ matrix.os }}

strategy:
Expand Down
8 changes: 0 additions & 8 deletions voila/notebook_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ async def _jinja_notebook_execute(self, nb, kernel_id):
# (it seems to be local to our block)
nb.cells = result.cells

await self._cleanup_resources()

async def _jinja_cell_generator(self, nb, kernel_id):
"""Generator that will execute a single notebook cell at a time"""
nb, _ = ClearOutputPreprocessor().preprocess(
Expand Down Expand Up @@ -302,12 +300,6 @@ async def _jinja_cell_generator(self, nb, kernel_id):
finally:
yield output_cell

await self._cleanup_resources()

async def _cleanup_resources(self):
await ensure_async(self.executor.km.cleanup_resources())
await ensure_async(self.executor.kc.stop_channels())

async def load_notebook(self, path):

model = await ensure_async(self.contents_manager.get(path=path))
Expand Down
Loading