
Custom Notebook Diffing and Merging Insights
Explore the necessity of custom diff/merge in notebooks, interfacing with git, and rich rendering for better oversight. Understand how to merge notebooks effectively and utilize structured formats for informed merges.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
nbdime: Notebook Diffing and Merging Vidar Tonaas Fauske Martin Sandve Aln s Min Ragan-Kelley Simula Research Laboratory, Oslo, Norway
Outline Notebook format: Why we need custom diff/merge Interfacing nbdime with git Merge tool
Why do we need custom diff/merge? Notebook format: Sequences Dictionaries (Strings = sequences) Atomic values: numbers, booleans, binary data (base64)
Why do we need custom diff/merge? Standard algorithms: - Sequence of strings (lines) We have a lot of a priori information!
How to interface CLI applications Rich renderes git diff driver / difftool git merge driver / mergetool
Diffing entries App / driver / CLI difftool Difftool: Browser view
Merging notebooks Major unit: Cell Source is more important than outputs! Source is traditional string merge Outputs are atomic (pick and mix)
git mergedriver Associate ipynb files with our merger Fewer conflict than default merger A: Execution count changed, B: Cell deleted
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