Overview
Ganimede includes built-in version control features designed specifically for computational notebooks. Every cell execution is versioned, and you can create checkpoints to save the complete state of your notebook.Auto Cell Commit
Every time you run a cell in Ganimede, the execution is automatically versioned. This feature is planned but not yet fully implemented.
- Each cell execution is tracked
- You can see the history of outputs for any cell
- You never lose important intermediate results
- You can revert to previous cell states
- ✅ Auto cell commit concept (feature description)
- ⏳ Store run history of cells (in development)
Checkpoint System
The checkpoint system allows you to save the complete state of your notebook at any point in time.Checkpoint Format
When you create a checkpoint, Ganimede saves the notebook with a.ganimede.ipynb extension:
api/ganimede/managers/Notebook.py:366-412
What Gets Saved
A checkpoint includes:Cell Data
For each cell in the notebook:api/ganimede/managers/Notebook.py:380-395
- Cell content: The source code or markdown text
- Outputs: All execution results, including text, images, and errors
- Canvas position:
top,left,width,heightcoordinates - Visual state: Collapse state for hiding inputs/outputs
Graph Metadata
Ganimede saves two important graph structures in the notebook metadata:-
np_graph (Next-Previous Graph):
- Defines the execution flow between cells
- Maps each cell to its next cell(s) in the execution order
- Enables sequential execution of related cells
-
pc_graph (Parent-Children Graph):
- Defines the hierarchical structure of the notebook
- Created from markdown heading cells (# H1, ## H2, etc.)
- Maps parent cells to their children cells
- Enables “tissue grouping” - running all cells under a heading
api/ganimede/managers/Notebook.py:398-405
File Format
Ganimede uses a custom notebook format:.ganimede.ipynb
Format Structure
Compatibility
The.ganimede.ipynb format:
- Extends the standard Jupyter
.ipynbformat - Adds Ganimede-specific metadata under the
gmkey - Can be converted back to standard
.ipynbby removinggmmetadata - Preserves all standard notebook features (cells, outputs, execution counts)
Working with Checkpoints
Creating a Checkpoint
To create a checkpoint of your current notebook state:Checkpoint File Location
If your original notebook isanalysis.ipynb, the checkpoint is saved as:
Loading from Checkpoint
To load a checkpointed notebook:- All cell positions on the canvas
- Cell execution outputs
- The np_graph and pc_graph structures
- Visual states (collapsed cells, etc.)
Graph-Based Execution
Next-Previous Graph (np_graph)
The np_graph enables linear execution flow:- Run cells in a defined sequence
- Execute chains of dependent cells
- Navigate the execution order visually on the canvas
Parent-Children Graph (pc_graph)
The pc_graph enables hierarchical execution:- Run all cells under a heading (“tissue grouping”)
- Organize complex notebooks hierarchically
- Collapse entire sections for better overview
The graphs are automatically constructed from your markdown headings and cell order when you first open a standard
.ipynb file.