Skip to content

chrisjohn2306/jupyterlab-git

 
 

Repository files navigation

jupyterlab-git

Binder Build Status Version Version Downloads Version Downloads

A JupyterLab extension for version control using git

To see the extension in action, open the example notebook included in the Binder demo.

Prerequisites

  • JupyterLab

Usage

  • Open the git extension from the Git tab on the left panel

Install

To install perform the following steps:

pip install --upgrade jupyterlab-git
jupyter lab build

Troubleshooting

Before consulting the following list, be sure the server extension and the frontend extension have the same version by executing the following commands:

jupyter serverextension list
jupyter labextension list
  • Issue: the Git panel does not recognize that you are in a Git repository.

    Possible fixes:

    • Be sure to be in a Git repository in the filebrowser tab

    • Check the server log. If you see a warning with a 404 code similar to:
      [W 00:27:41.800 LabApp] 404 GET /git/server_root?1576081660665

      Explicitly enable the server extension by running:

      jupyter serverextension enable --py jupyterlab_git
    • If you are using JupyterHub or some other technologies requiring an initialization script which includes the jupyterlab-git extension, be sure to install both the frontend and the server extension before launching JupyterLab.

  • Issue: the Git panel is not visible.

    Possible fixes:

    • Check that the JupyterLab extension is installed:

      jupyter labextension list

      If you don't see @jupyterlab/git v... enabled OK in the list, explicitly install the jupyter labextension by running:

      jupyter labextension install @jupyterlab/git

Development

Contributing

If you would like to contribute to the project, please read our contributor documentation.

JupyterLab follows the official Jupyter Code of Conduct.

Team

The Jupyter Git extension is part of Project Jupyter and is developed by an open community of contributors. Our maintainer team is accompanied by a much larger group of contributors to JupyterLab and Project Jupyter as a whole.

JupyterLab Git's current maintainers are listed in alphabetical order, with affiliation, and main areas of contribution:

  • Brian Granger, Cal Poly (co-creator, strategy, vision, management, UI/UX design, architecture).
  • Saul Shanabrook, Quansight(software engineering)
  • Jaipreet Singh, AWS (software engineering, UI/UX design, management)
  • Frederic Collonval, Safran Group (software engineering)

A lot of awesome people have contributed to this repo - See the contributors tab for more details!

This list is provided to help provide context about who we are and how our team functions. If you would like to be listed, please submit a pull request with your information.

Install

Requires node 4+ and npm 4+

# Install new-ish JupyterLab
pip install -U jupyterlab

# Clone the repo to your local environment
git clone https://github.com/jupyterlab/jupyterlab-git.git
cd jupyterlab-git

# Install the server extension in development mode and enable it
pip install -e .[test]
jupyter serverextension enable --py jupyterlab_git

# Build the labextension and dev-mode link it to jlab
jlpm build
jupyter labextension link .

To rebuild the package after a change and the JupyterLab app:

jlpm run build
jupyter lab build

Or start jupyter in watch mode:

jupyter lab --watch

And in a separate session, start this project in watch mode:

jlpm run watch

Now every change will be built locally then bundled into Jupyter Lab. Refresh the page after any save to see your change (note: you'll need to wait for webpack to finish, which can take 10s+ at times).

To execute the tests

pytest jupyterlab_git
jlpm run test

About

A Git extension for JupyterLab

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 64.2%
  • Python 31.7%
  • CSS 3.5%
  • JavaScript 0.6%