Jupyter Notebooks are a versatile and popular instance of the literate programming paradigm. Jupyter allows authors to intersperse code chunks with explanation and annotation, providing readers with more information about the intent and function of programming choices.

Code Ocean allows users to run Jupyter notebooks from the top-down, which we call 'reproducibility mode,' or interactively, which will run the more typical Jupyter notebook interface.

Reproducibility Mode (executing and rendering to HTML):

To publish on Code Ocean we ask that notebooks be executed as a whole, serving as a reproducible record of the analysis from start to finish. 

To do so, use a shell script to execute jupyter nbconvert , rendering the final results into /results , and with the --execute  flag listed. 

jupyter nbconvert \
  --ExecutePreprocessor.allow_errors=True \
  --ExecutePreprocessor.timeout=-1 \
  --FilesWriter.build_directory=../results \
  --execute my-awesome-notebook.ipynb

 Note on inline results:

Code Ocean currently strips out the inline results from notebooks in the /code pane. This showcases that all notebooks in the /results  have been successfully rendered in the Code Ocean environment.

Example Capsules:

Further Reading:


Did this answer your question?