guilgautier/DPPy

Git and notebooks

rbardenet opened this issue · 4 comments

I've had trouble with git and jupyter notebook in the past. Best to "restart and clear output" of each notebook before commiting. Otherwise, conflicts arise if different contributorshave differences in how they render images locally.

I would agree, I even saw just this morning an extension that does just this job automatically (https://github.com/kynan/nbstripout). It can be installed easily and be activated as a git pre-hook (meaning it runs locally before you commit, so you don't even need to think about it!).

But I also agree about the opposite, if notebooks are included as examples and documentation, then having the output is definitely needed!
See for instance this example in my SMPyBandits library.

I understand your point. Maybe the best trade-off is to also upload an html rendering (with figures) alongside the notebook itself (without figures). I agree this is not optimal, as it doesn't use the ability of github to automatically generate the rendering.

I don't know about the best approach, that would be your choice, but I agree about the tradeoff!

Ok let's adopt the Kernel + Restart & Clear Output :)