Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Github Code Review

When doing a code review on jupyter notebooks in github, it shows only the html code that generates the notebook. Are there any extensions that would enable github to show the rendered jupyter notebook, along with the ability to comment on cells for code review?

like image 970
Alex R. Avatar asked Feb 20 '18 21:02

Alex R.


People also ask

How do I review a Jupyter Notebook GitHub?

How to review Jupyter Notebooks? You can use GitHub to version control notebooks (there's a JupyterLab git extension for this). Once the notebooks are present in your repositories you can open them via ReviewNB and start the review process.

Is Jupyter Notebook good for coding?

Jupyter Notebook has become incredibly popular among data scientists and general users of Python and R. While the Jupyter framework is liberal and lets you be creative, it would benefit you, your team, and your readers if you define a structure and follow it.

Does GitHub work with Jupyter Notebook?

Linking Jupyter Notebooks to GitHubAfter configuring the GitHub token, you can link the Jupyter notebooks to GitHub. Obtain the GitHub repository URL. Navigate to the GitHub profile and click Repositories. From the list of repositories, click the repository that you want to link.


1 Answers

Under the hood Notebook files are JSON documents. All the markdown, code, outputs are present in this JSON document. Since git diff used by GitHub is meant for text files, it's hard to read Jupyter Notebook diffs on GitHub.

I built a GitHub app ReviewNB specifically to review Jupyter Notebooks on GitHub. It integrates directly with your repositories on GitHub and provides visual diff and commenting support (see screenshot below).

There's also nbdime if you just want to access rendered diff locally.

enter image description here

like image 85
amirathi Avatar answered Sep 20 '22 00:09

amirathi