Issue
Can anyone here share some recommendations and best practices for working with Jupyter notebooks and Bitbucket/git? We have the Notebook viewer plugin installed, which allows us to view the notebooks.
However, we still have troubles in pull requests. It shows the raw JSON. We'd be happy to receive recommendations.
Solution
If the output does not have to be reviewed (say, you will use the notebook as a template), then jupytext is your best option: https://github.com/mwouts/jupytext. It will allow you to transparently open several formats (py, md, etc) as Jupyter notebooks. Users will work with them as they now do but your pull request will do diffs on text files, not JSON.
If you want to keep the ipynb format, there is an official tool to run diffs on notebooks called nbdime (https://github.com/jupyter/nbdime). You can integrate nbdime with the git CLI.
Answered By - Edu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.