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 are calling 'reproducibility mode,' or interactively, which will be familiar to those accustomed to Jupyter. See articles below for more information.
For an example of Jupyter notebooks on Code Ocean, see A Modularized Efficient Framework for Non-Markov Time Series Estimation.
To execute a Jupyter notebook from top-to-bottom, use a shell script to execute the
jupyter nbconvert command, rendering the final results into
/results . To render multiple notebooks at once, you will run something like:
jupyter nbconvert \
This will execute every file ending in the extension
Note on inline results:
Code Ocean currently strips out the inline results from notebooks in the
/code pane. This showcases the fact that all notebooks in the
/results have been successfully rendered in the Code Ocean environment.
Rendering Jupyter notebooks to HTML (has more specific notes on
- Interactive Jupyter Sessions
- Converting a Jupyter notebook to the latest version
nbconvert GitHub repo (external resource)