vatlab / sos-notebook

Multi-language Jupyter Notebook
http://vatlab.github.io/SoS
BSD 3-Clause "New" or "Revised" License
176 stars 17 forks source link

A generalized concept and storage model of "SoS Notebook" #240

Open BoPeng opened 5 years ago

BoPeng commented 5 years ago

Right now our "notebook" is a Jupyter Notebook in JSON format. However in reality the results of our data analysis usually consist of a notebook, and various result files such as figures and tables. It would be helpful to have a generalized concept of Notebook that includes these components.

For example,

Notebook storage

  1. A notebook is a directory that consists of a notebook (the only one or index.ipynb if there are multiple notebooks). The directory can have multiple external files.
  2. The notebook can stay in the format of a directory, a semi-directory like "apps" in MacOSX, or a compressed file (e.g. with extension .sosnb), depending on how the notebook is stored or transferred.
  3. The notebook could include hidden maintenance files such as revision log, access log, comments etc, perhaps in a .sos folder.

Viewing SoS notebooks

  1. When we store the notebook in SoS Portal (or something of that nature), it is "viewed" as a single notebook, that shows the primary notebook and the attachments, with option to "download" the attachments.

  2. The viewer could preview the attached files statically (through %preview), or dynamically if a live server is available to present the content to viewers. That is to say, if we have a server to serve the notebook to others, the website could change dynamically with the change of underlying notebook or attachment.

Editing SoS notebooks

  1. Jupyter Notebook and Jupyter Lab can continue to edit the notebook.
  2. Regular file operations can be used to add/edit/remove files in the directory.
  3. An automatic "attachment" section could be added to the notebook to show all attached files.
BoPeng commented 5 years ago

The configuration file could also have information to create docker files... There should be somewhat standard format for this purpose.