Tutorial — Interactive DIC notebook (Marimo)
This page is the main learn-by-doing tutorial entry point for the project. If you want to understand the library by running a real workflow, start here.
This page explains how to run the base DIC notebook with a real Python runtime.
Notebook source:
Notebook features:
Load JSON from PC (upload button)
Export JSON to PC (download button)
Generate Graphviz SVG graph + Export graph SVG to PC
1) Local test (interactive editor)
Install notebook dependencies
python -m pip install -r requirements-notebook.txt
Graphviz requirement
The notebook renders graphs as SVG with Graphviz.
The Python requirements are not enough on their own: the Graphviz executable dot must also be installed on the system.
Linux:
sudo apt-get install graphvizmacOS:
brew install graphvizWindows: install from https://graphviz.org/download/ and ensure
dotis inPATH
Quick check:
dot -V
Start Marimo
python scripts/dev.py notebook-dic
Then open the URL printed by Marimo (usually http://127.0.0.1:2718).
What to validate
In the notebook:
Run all cells.
Check the validation callout confirms payload is valid.
Click Load JSON from PC and select an existing
.jsonfile (optional).Confirm the status callout says the uploaded file was loaded and validated.
Click Export JSON to PC.
Click Generate Graphviz SVG.
Click Export graph SVG to PC.
Optional repository save:
save_document()
Confirm that
examples/artifacts/dic_pipeline_notebook.jsonexists.
2) MyBinder (public interactive run)
Open:
How it works in this repository:
Dependencies come from
binder/requirements.txt.System packages come from
binder/apt.txt(graphvizis installed).Binder startup runs
binder/start, which launches:marimo edit examples/notebooks/dic_base_marimo.py --port 2718.Binder then proxies to Marimo at
/proxy/2718/.
Notes:
First launch can take 2-5 minutes (image build).
If the page is blank during startup, wait and refresh once.