Save Inputs: clear ipywidgets state, clear all cells output, save notebook in its leanest form.
Save Custom: save notebook after keeping only those options ticked in a setting file if present, else in a popup displaying all possible options (ipywidgets, metadata, etc), which a user can save for a subsequent 'save custom'.
Save All: save notebook with all options ticked.
Maybe ask for confirmation if some output cells or metadata in the notebook are to be erased - for the case of long calculations.
The benefits, I think, are:
regular users have 2 simple plain options (Save Inputs and Save All): the first one to keep a minimal sized notebook on disk (convenient on github), the second to keep absolutely everything (from matplotlib images, to displayed ipywdgets, to cell 'status' like expanded/folded) they see and find it again upon reopening.
advanced users can customize at will.
And of course these 3 actions are available programmatically.
Hope it makes sense.
The text was updated successfully, but these errors were encountered:
It is not directly related to the save menu options described above but explores another avenue to save notebooks in an 'orderly' fashion ie. convenient wrt github and IDEs, and I think shows the community's interest find a way to save 'clean' versions of notebooks on github.
Plugins can register a save handler with the notebook model, which has a title, description, and callback. These handlers are put in the "Save Custom" dialog box. For each one checked, the appropriate handler is called in
to modify the serialized output (or perhaps they should modify a copy of the model, created by serializing and hydrating the minimal model, so that it's easy to subclass the model to create an ipymd file, for example).
I think we should get some experience with this before perhaps moving it up to generic documents and serialization, if we can.