Skip to content

Commit 3cb2b3d

Browse files
committed
1. Identified slow notebooks - 08b-rolling-horizon (5 min) and 08c2-clustering-storage-modes (5 min)
2. Created slow_notebooks.txt - config file to exclude them from regular CI 3. Updated CI - fast notebooks run on every build, slow ones only on release 4. Switched to Plotly CDN - notebooks now ~98% smaller (4.8MB → 79KB each)
1 parent b6e1445 commit 3cb2b3d

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
env:
2929
PYTHON_VERSION: "3.11"
3030
MPLBACKEND: Agg
31-
PLOTLY_RENDERER: json
31+
PLOTLY_RENDERER: cdn
3232

3333
jobs:
3434
build:

flixopt/config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,9 @@ def notebook(cls) -> type[CONFIG]:
836836
"""
837837
import plotly.io as pio
838838

839-
# Set plotly to render inline in notebooks
840-
pio.renderers.default = 'notebook'
839+
# Set plotly to render inline in notebooks (respect PLOTLY_RENDERER env var)
840+
if 'PLOTLY_RENDERER' not in os.environ:
841+
pio.renderers.default = 'notebook'
841842
pio.templates.default = 'plotly_white'
842843

843844
# Disable default show since notebooks render via _repr_html_

0 commit comments

Comments
 (0)