Skip to content

[OpenSTEF 4.0] Convert all tutorial notebooks to jupytext and add to CI/release workflow #850

@egordm

Description

@egordm

Summary

Convert all tutorial notebooks in examples/tutorials/ to jupytext paired format (.py percent + .ipynb) and integrate notebook generation/execution into the release and documentation workflow.

Context

We converted try_optuna.ipynbhyperparameter_tuning_with_optuna.{py,ipynb} using jupytext pairing as part of the tuning refactor. The .py source is much easier to edit, review, and diff. The remaining notebooks should follow the same pattern.

Notebooks to convert

  • forecasting_with_workflow_presets.ipynb
  • backtesting_openstef_with_beam.ipynb

Workflow integration

  • Add a Poe task (e.g. poe notebooks) that runs jupytext --sync on all paired notebooks
  • Add a Poe task or CI step that executes notebooks (e.g. via jupyter execute or papermill) to verify they run without errors
  • Include notebook sync/execution in the release checklist or docs build workflow
  • Consider adding a pre-commit hook or CI check to ensure .py and .ipynb stay in sync

Notes

  • Jupytext is already in dev dependencies
  • Per-file Ruff ignores and Pyright exclusions for examples/tutorials/ are already configured
  • Each .py file should have the SPDX header after (not before) the jupytext YAML frontmatter

Metadata

Metadata

Assignees

No one assigned

    Labels

    OpenSTEF 4.0Work for OpenSTEF 4.0choreImprovements or additions to documentation

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions