by jpfr · 8y ago · 0 comments
People are writing entire books in the literate style:
http://nbviewer.jupyter.org/github/rlabbe/Kalman-and-Bayesia...
The style is similar to literate classics like "Structure and Interpretation of Computer Programs" and "Structure and Interpretation of Classical Mechanics".
The only downside is version control. Jupyter uses a custom file format. It is difficult to work with colleagues on the same notebook, since we cannot use the usual code-versioning tools (git/diff/etc.) to manually merge together concurrent changes.
Anybody knows a good solution for this?
gitconfig:
[filter "nbstrip_full"]
clean = "jq --indent 1 \
'(.cells[] | select(has(\"outputs\")) | .outputs) = [] \
| (.cells[] | select(has(\"execution_count\")) | .execution_count) = null \
| .metadata = {\"language_info\": {\"name\": \"python\", \"pygments_lexer\": \"ipython3\"}} \
| .cells[].metadata = {} \
'"
smudge = cat
required = true
gitattributes: *.ipynb filter=nbstrip_full
[0] http://timstaley.co.uk/posts/making-git-and-jupyter-notebook...For those curious, the ipynb files are json files, and the code is stored in an array of cells, as string entries
It's right here where you're commenting: org-mode.