{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Writing Modular Jupyter Notebooks\n", "\n", "by Jake Kara \n", "\n", "## Overview\n", "\n", "This repository includes a set of interactive tutorials on writing modular Jupyter Notebooks and the underlying margin note concept that makes them possible, and the specific syntax for margin notes, called Margo.\n", "\n", "## Prerequisites\n", "\n", "These notebooks assumes some basic experience with Python and Jupyter Notebooks.\n", "\n", "## Lessons\n", "\n", "The notebooks in this repository are designed to be read in a particular order.\n", "\n", "The first two notebooks will be enough for most readers who just want to learn about modular notebooks — how to write them, and how to import them.\n", "\n", "* [Importing notebooks.ipynb](./Importing%20Notebooks.ipynb) — Learn to use Margo Loader to import a notebook as a Python module.\n", "* [Met API.ipynb](./Met%20API.ipynb) — Learn to use Margo notes to write a notebook that's useful both as a notebook and a module.\n", "\n", "Margo notes can be used for more than making notebooks more useful as reusable modules. They can also be used to encode information about the notebook that can be read by other applications. This next notebook shows one way this can be very useful.\n", "\n", "* [Generating requirements.txt.ipynb](./Generating%20requirements.txt.ipynb) — Learn store a notebook's dependencies in Margo notes and retrieve them with a command-line tool.\n", "\n", "The next two notebooks look in a little more depth at the syntax and keywords we've used in the previous notebooks.\n", "\n", "* [Margo keyword reference.ipynb](./Margo%20keyword%20reference.ipynb) — Throughout these notebooks, we use Margo notes with specific keywords, like `ignore-cell` and `module-stop`, that have special meaning to the application Margo Loader. This notebook defines their meanings all in one place.\n", "* [Margo syntax primer.ipynb](./Margo%20syntax%20primer.ipynb) — The keywords we've learned about so far are not part of the underlying Margo syntax — they're keywords that are defined by applications built on top of Margo. This notebook describes in a bit more detail how the underlying Margo syntax works. Knowing the mechanics of the syntax, you can define new keywords for your own purposes, including developing new applications that extend Jupyter Notebooks in different ways." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.9" } }, "nbformat": 4, "nbformat_minor": 4 }