examples icon indicating copy to clipboard operation
examples copied to clipboard

Better handle displaying streams and progress bars

Open maximlt opened this issue 1 year ago • 0 comments

We have some issues when building the site dealing with outputs to stdout/stderr (see screenshots below):

  1. streams are displayed on multiple cells
  2. too many progress bar outputs displayed

For 1, I just found out about he nb_merge_streams option of MyST-NB that is False by default. We could try to set it to True and see how it goes. See https://myst-nb.readthedocs.io/en/latest/render/format_code_cells.html#group-into-single-streams.

Not sure for 2 but that's definitely been annoying and has forced us to silence progress bars. For example, in https://github.com/holoviz-topics/examples/pull/274 I set INTAKE_CACHE_PROGRESS to false to disable the progress bar automatically displayed by intake when it downloads a dataset (only during the notebook evaluation for building the site).

Streams on multiple cells: Image

Progress bar output: Image

Note that this worked well on the old examples.pyviz.org, that used the NotebookDirective (implemented pre MyST-NB, based on nbconvert?) and a custom theme: Image

maximlt avatar Dec 06 '24 06:12 maximlt