From d6df191fd45575f45c0d7206187d072a15a3aa60 Mon Sep 17 00:00:00 2001 From: "RIO\\teodora.misan" Date: Wed, 31 Jul 2024 14:30:28 +0300 Subject: [PATCH] fix-notebookrun: update notebook TimeSeriesEDF content for testing --- .github/workflows/notebooks.yml | 4 +- notebooks/TimeSeriesEDF.ipynb | 84 ++++++--------------------------- 2 files changed, 15 insertions(+), 73 deletions(-) diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 972d09b..30926aa 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -25,6 +25,4 @@ jobs: python -m pip install nbformat nbconvert - name: Run notebooks - run: | - cd notebooks - python ../dev/notebook_runner.py . + run: python ./dev/notebook_runner.py notebooks diff --git a/notebooks/TimeSeriesEDF.ipynb b/notebooks/TimeSeriesEDF.ipynb index 75786cb..83fd5d2 100644 --- a/notebooks/TimeSeriesEDF.ipynb +++ b/notebooks/TimeSeriesEDF.ipynb @@ -26,7 +26,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "56d5c4b6-7804-46d6-931f-fcc5593977d1", "metadata": {}, "outputs": [], @@ -36,26 +36,13 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "28420169-2274-4e0e-a73d-c1ab54e6da9c", "metadata": { "scrolled": true, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "17-04-2024 05:02:37 - DEBUG - tvbwidgets - Package is not fully installed\n", - "17-04-2024 05:02:37 - DEBUG - tvbwidgets - Version read from the internal package.json file\n", - "17-04-2024 05:02:37 - INFO - tvbwidgets - Version: 2.0.0\n", - "Using matplotlib as 2D backend.\n", - " INFO Cannot import syncrypto library.\n", - "17-04-2024 05:02:49 - INFO - tvbwidgets.core.pse.parameters - ImportError: Dask dependency is not included, so this functionality won't be available\n" - ] - } - ], + "outputs": [], "source": [ "import numpy as np\n", "from tvbwidgets.api import plot_timeseries\n", @@ -72,45 +59,27 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "94687d23-0222-4e9f-887e-e97169737304", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Extracting EDF parameters from C:\\Work\\TVB\\tvb-widgets\\tvbwidgets\\tests\\data\\test_file.edf...\n", - "EDF file detected\n", - "Setting channel info structure...\n", - "Creating raw.info structure...\n" - ] - } - ], + "outputs": [], "source": [ - "edf_file_path = '../tvbwidgets/tests/data/test_file.edf' # replace path with your actual EDF file path\n", + "edf_file_path = 'tvbwidgets/tests/data/test_file.edf' # replace path with your actual EDF file path\n", + " # set this path file for notebooks tests\n", + "# you can use: '../tvbwidgets/tests/data/test_file.edf'\n", "data, freq, index = read_edf_file(edf_file_path)" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "12da93b3-f96f-44cf-8555-52eee8aaecfd", "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(92000, 32)\n", - "400.0\n" - ] - } - ], + "outputs": [], "source": [ "print(data.shape)\n", "print(freq)" @@ -126,7 +95,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "cac83fe3-b4fe-486a-8955-70203dda1004", "metadata": {}, "outputs": [], @@ -136,35 +105,10 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "20c3eae2-49dd-4d01-af9a-06a0dba15888", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "17-04-2024 05:02:49 - INFO - tvbwidgets.ui.ts.plotly_ts_widget - TimeSeries Widget with Plotly initialized\n", - "Creating RawArray with float64 data, n_channels=32, n_times=92000\n", - " Range : 0 ... 91999 = 0.000 ... 229.998 secs\n", - "Ready.\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "28d8ffb85be94f28b59e85b521e4aeeb", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "TimeSeriesWidgetPlotly(children=(HBox(children=(Output(),)), VBox(children=(Dropdown(description='Colormap:', …" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "tsw = plot_timeseries(data=data, sample_freq=freq, ch_idx=index, backend=backend)" ] @@ -194,7 +138,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.18" + "version": "3.9.19" } }, "nbformat": 4,