Hey all - a couple of quick thoughts:
first - thanks for working to improve the
ipynb experience in GitHub, it is much appreciated!
regarding a text-based version, do you imagine this being something that users will see? Or using this just under-the-hood for diffing, merging, etc? I say this because if you imagine this as a user-facing thing then I think it’d be best done in partnership with several stakeholders around the Jupyter community so you don’t unintentionally end up creating a new standard for notebooks w/o doing so thoughtfully. The
ipynb format has undergone many, many iterations and discussion and we want to make sure the same thought goes into creating representations of it that would become usable on GitHub.
there is a tool called
nbdime (for “notebook diffing and merging”) (https://github.com/jupyter/nbdime) that folks have used for many years. Perhaps it could be used as a part of this functionality in GitHub? There are also products that accomplish this, though I’m not sure whether their underlying code is open source (e.g., ReviewNB).
regarding notebooks -> markdown etc, I’d check out the jupytext project - that provides two-way conversion between
ipynb and a variety of text formats. I’d recommend you leverage this tool and/or contribute upstream improvements to it if possible instead of creating a new github-specific markdown version of a notebook. The Jupyter Book project recently started using jupytext for its markdown notebook representation which has worked pretty well for us. Happy to chat about that if it’s helpful.
Finally - I’d also look around this forum for previous discussions that touch on this, for example: