JupyterLab extension to create GitHub pull requests
A JupyterLab plugin for version control of Jupyter notebooks. It can,
- Create & push commits to GitHub from JupyterLab
- Create GitHub pull request from JupyterLab
Create GitHub Pull Request from JupyterLab
Push GitHub Commits from JupyterLab
- JupyterLab >= 2.0
pip install jupyterlab_gitplus jupyter labextension install @reviewnb/jupyterlab_gitplus jupyter serverextension enable --py jupyterlab_gitplus
Setup GitHub token
Here's GitHub's guide to generate personal access token. Briefly speaking,
- Head over developer settings on GitHub. Click "Generate New Token".
- Select Repo scope. Click "Generate Token". Copy the generated token.
- Open you Jupyter config file
~/.jupyter/jupyter_notebook_config.py& paste the token as below
c.GitPlus.github_token = '<your-github-access-token>'
After installation, start JupyterLab normally & you should see "Git-Plus" as a new menu item.
Where is pull request (PR) opened in case of forked repositories?
If your repository is forked from another repository (parent) then PR will be created on parent repository.
Which is the base branch used in a pull request?
base branch in a PR is a branch against which your changes are compared and ultimately merged. We use repository's default branch (usually called
base branch of PR. We use parent repository's default branch as
base in case of forked repo.
Which is the head branch used in a pull request?
head branch in a PR is a branch which contains the latest changes you've made. We create a new branch (e.g.
head branch. It only contains changes from the files you wish to include in the PR.
How can I edit a pull request opened with GitPlus?
You can head over to GitHub and edit the PR metadata to your liking. For pushing additional file changes to the same PR,
- Copy the branch name from GitHub UI (e.g.
- Checkout that branch locally
- Make the file changes you want
- Use push commit functionality from GitPlus to push new changes
Is GitPlus tied to ReviewNB in any way?
No. GitPlus is it's own open source project. The only connection with ReviewNB is that at the end of PR/Commit creation, GitPlus shows ReviewNB URL along with GitHub URL. You can safely ignore these URLs if you don't want to use ReviewNB.
What if I don't have a ReviewNB account?
No problem, everything in GitPlus will still work fine. Only the ReviewNB URLs won't work for you.
Can we use GitPlus with Gitlab/BitBucket or any other platforms?
No, currently we only support repositories on GitHub.
jlpm command is JupyterLab's pinned version of
yarn that is installed with JupyterLab. You may use
npm in lieu of
# Clone the repo to your local environment & install dependencies # Link your development version of the extension with JupyterLab jupyter labextension link . # Run jupyterlab in watch mode in one terminal tab jupyter lab --watch # Watch the GitPlus source directory in another terminal tab jlpm watch # If you make any changes to server side extension (.py files) then reinstall it from source pip install .
Our aim is to make notebooks a first class entity in Data science & ML teams. We can achieve this by making notebooks play well with existing tools & processes instead of building expensive proprietary platforms. Other projects in this direction are,
- ReviewNB - Code review tool for Jupyter notebooks
- treon - Easy to use test framework for Jupyter notebooks
If you see any problem, open an issue or send a pull request. You can write to email@example.com for any questions.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size jupyterlab_gitplus-0.1.13-py3-none-any.whl (19.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size jupyterlab_gitplus-0.1.13.tar.gz (6.5 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for jupyterlab_gitplus-0.1.13-py3-none-any.whl
Hashes for jupyterlab_gitplus-0.1.13.tar.gz