ogstools.workflow.jupyter_conversion module#

ogstools.workflow.jupyter_conversion.jupyter_to_html(input_path, show_input=False)[source]#

Converts a Jupyter notebook to HTML format.

Parameters:
  • input_path (Path) – The path to the Jupyter notebook file.

  • show_input (bool) – If True, includes input cells in the HTML output. Defaults to False, hiding input cells.

Return type:

str

returns: The generated HTML representation of the Jupyter notebook.

ogstools.workflow.jupyter_conversion.jupytext_to_jupyter(template_path, output_name, params, prepare_only=False, show_progress=False)[source]#

Convert a Jupytext-formatted notebook to a Jupyter notebook and execute it.

Parameters:
  • template_path (Path) – The path to the Jupytext-formatted notebook.

  • output_name (Path) – The desired path for the resulting Jupyter notebook.

  • params (dict) – Parameters passed to the notebook during execution.

  • prepare_only (bool) – If True, don’t execute the notebook. Defaults to False, executing the notebook.

  • show_progress (bool) – If True, display a progress bar during execution. Defaults to False.

Returns:

None: The function does not return a value, but generates the Jupyter notebook.