From 184aaa0059e73a543f9b5d1f116f638fd640d475 Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Sun, 4 Jul 2021 06:50:44 +0300 Subject: [PATCH] [ci] ensure interactive_plot_example notebook is run in interactive mode at CI (#4432) --- .ci/test.sh | 1 + .ci/test_windows.ps1 | 1 + 2 files changed, 2 insertions(+) diff --git a/.ci/test.sh b/.ci/test.sh index f7df0f0dd..680dae5e2 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -237,5 +237,6 @@ matplotlib.use\(\"Agg\"\)\ conda install -q -y -n $CONDA_ENV h5py ipywidgets notebook # requirements for examples for f in *.py **/*.py; do python $f || exit -1; done # run all examples cd $BUILD_DIRECTORY/examples/python-guide/notebooks + sed -i'.bak' 's/INTERACTIVE = False/assert False, \\"Interactive mode disabled\\"/' interactive_plot_example.ipynb jupyter nbconvert --ExecutePreprocessor.timeout=180 --to notebook --execute --inplace *.ipynb || exit -1 # run all notebooks fi diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 0d191ab09..49a1cdaf4 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -112,5 +112,6 @@ if (($env:TASK -eq "regular") -or (($env:APPVEYOR -eq "true") -and ($env:TASK -e python $file ; Check-Output $? } # run all examples cd $env:BUILD_SOURCESDIRECTORY/examples/python-guide/notebooks + (Get-Content "interactive_plot_example.ipynb").replace('INTERACTIVE = False', 'assert False, \"Interactive mode disabled\"') | Set-Content "interactive_plot_example.ipynb" jupyter nbconvert --ExecutePreprocessor.timeout=180 --to notebook --execute --inplace *.ipynb ; Check-Output $? # run all notebooks }