Download presentation
Presentation is loading. Please wait.
1
nbdime: Notebook Diffing and Merging
Vidar Tonaas Fauske Martin Sandve Alnæs Min Ragan-Kelley Simula Research Laboratory, Oslo, Norway
2
Outline Notebook format: Why we need custom diff/merge
Interfacing nbdime with git Merge tool
3
Why do we need custom diff/merge?
Notebook format: Sequences Dictionaries (Strings = sequences) Atomic values: numbers, booleans, binary data (base64)
4
Why do we need custom diff/merge?
Standard algorithms: - Sequence of strings (lines) We have a lot of a priori information!
5
How to interface CLI applications Rich renderes
git diff driver / difftool git merge driver / mergetool Rich renderes
6
Diffing entries App / driver / CLI difftool Difftool: Browser view
7
Merging notebooks Major unit: Cell
Source is more important than outputs! Source is “traditional” string merge Outputs are atomic (pick and mix)
8
git mergedriver Associate ipynb files with our merger
Fewer conflict than default merger A: Execution count changed, B: Cell deleted
9
Mergetool – git mergetool
10
Mergetool – Outputs mockup
11
Summary Custom diff/merge because of structured format (JSON)
Also allows us to make informed merges Interfacing nicely with git Rich rendering allows for better oversight
12
Thanks!
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.