Skip to content

Commit

Permalink
fix-notebookrun: update notebooks.yml to use ubuntu image
Browse files Browse the repository at this point in the history
  • Loading branch information
915-Misan-Teodora committed Aug 6, 2024
1 parent d6df191 commit 4f5f706
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
name: Run notebooks
runs-on: windows-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
Expand All @@ -18,11 +18,16 @@ jobs:
with:
python-version: 3.8

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1 xvfb
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install nbformat nbconvert
- name: Run notebooks
run: python ./dev/notebook_runner.py notebooks
run: xvfb-run -a python ./dev/notebook_runner.py notebooks
2 changes: 1 addition & 1 deletion dev/notebook_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def execute_notebook(in_path, notebook):
if not os.getenv('CLB_AUTH'):
os.environ['CLB_AUTH'] = 'abc'

notebooks = [file for file in os.listdir(in_path) if file.endswith(".ipynb") and not file.startswith('HeadWidget')]
notebooks = [file for file in os.listdir(in_path) if file.endswith(".ipynb")]

# start as many threads as logical cpus
with ThreadPool(cpu_count()) as pool:
Expand Down
3 changes: 3 additions & 0 deletions tvbwidgets/ui/head_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

from tvbwidgets.ui.base_widget import TVBWidget
from tvbwidgets.ui.widget_with_browser import TVBWidgetWithBrowser
from tvbwidgets.core.logger.builder import get_logger

LOGGER = get_logger(__name__)
pyvista.set_jupyter_backend('trame')


Expand Down Expand Up @@ -85,6 +87,7 @@ def hide_actor(self, actor):

def update_plot(self):
with self:
LOGGER.info('Update plot.')
self.clear_output(wait=True)
self.plotter.show()

Expand Down

0 comments on commit 4f5f706

Please sign in to comment.