All Projects → jupyterlab → Jupyterlab Git

jupyterlab / Jupyterlab Git

Licence: bsd-3-clause
A Git extension for JupyterLab

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Jupyterlab Git

Jupyterlab Google Drive
Cloud storage for JupyterLab using Google Drive
Stars: ✭ 332 (-58.96%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Variableinspector
Variable Inspector extension for Jupyterlab
Stars: ✭ 747 (-7.66%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab-topbar
JupyterLab Top Bar extension
Stars: ✭ 95 (-88.26%)
Mutual labels:  jupyterlab, jupyterlab-extension
theme-darcula
A handsome Darcula theme for Jupyterlab. The first jlab theme to include dark scrollbars
Stars: ✭ 136 (-83.19%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyter Renderers
Renderers and renderer extensions for JupyterLab
Stars: ✭ 395 (-51.17%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab-python-file
JupyterLab extension to create Python files
Stars: ✭ 50 (-93.82%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Github
GitHub integration for JupyterLab
Stars: ✭ 273 (-66.25%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab-theme-solarized-dark
JupyterLab 2/3 Solarized Dark extension
Stars: ✭ 61 (-92.46%)
Mutual labels:  jupyterlab, jupyterlab-extension
Debugger
A visual debugger for Jupyter notebooks, consoles, and source files
Stars: ✭ 476 (-41.16%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Lsp
Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol
Stars: ✭ 796 (-1.61%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Dash
An Extension for the Interactive development of Dash apps in JupyterLab
Stars: ✭ 342 (-57.73%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupytext
Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
Stars: ✭ 4,969 (+514.22%)
Mutual labels:  jupyterlab, jupyterlab-extension
ipylab
Control JupyterLab from Python Notebooks with Jupyter Widgets 🧪 ☢️ 🐍
Stars: ✭ 101 (-87.52%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Sql
SQL GUI for JupyterLab
Stars: ✭ 336 (-58.47%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyter-project
Handle project folder, template and file templates in JupyterLab
Stars: ✭ 13 (-98.39%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab-spreadsheet-editor
JupyterLab spreadsheet editor for tabular data (e.g. csv, tsv)
Stars: ✭ 72 (-91.1%)
Mutual labels:  jupyterlab, jupyterlab-extension
pull-requests
A JupyterLab extension for reviewing GitHub pull requests
Stars: ✭ 33 (-95.92%)
Mutual labels:  jupyterlab, jupyterlab-extension
jupyterlab-credentialstore
A secure way of storing credentials within JupyterLab
Stars: ✭ 19 (-97.65%)
Mutual labels:  jupyterlab, jupyterlab-extension
Lantern
Data exploration glue
Stars: ✭ 292 (-63.91%)
Mutual labels:  jupyterlab, jupyterlab-extension
Jupyterlab Toc
Table of Contents extension for JupyterLab
Stars: ✭ 660 (-18.42%)
Mutual labels:  jupyterlab, jupyterlab-extension

jupyterlab-git

Binder Github Actions Status Version Version Downloads Version Downloads All Contributors

A JupyterLab extension for version control using Git

ui_glow_up

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

Requirements

  • JupyterLab >= 3.0 (older version available for 2.x)
  • Git (version >=2.x)

Usage

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

Install

To install perform the following steps, with pip:

pip install --upgrade jupyterlab jupyterlab-git

or with conda:

conda install -c conda-forge jupyterlab jupyterlab-git

For JupyterLab < 3, you will need to run the following command after installing the package:

jupyter lab build

Uninstall

pip uninstall jupyterlab-git

or with conda:

conda remove jupyterlab-git

For JupyterLab < 3, you will also need to run the following command after removing the Python package:

jupyter labextension uninstall @jupyterlab/git

Settings

UI Settings

Once installed, extension behavior can be modified via the following settings which can be set in JupyterLab's advanced settings editor:

  • blockWhileCommandExecutes: suspend JupyterLab user interaction until Git commands (e.g., commit, pull, reset, revert) finish executing. Setting this to true helps mitigate potential race conditions leading to data loss, conflicts, and a broken Git history. Unless running a slow network, UI suspension should not interfere with standard workflows. Setting this to false allows for actions to trigger multiple concurrent Git actions.
  • cancelPullMergeConflict: cancel pulling changes from a remote repository if there exists a merge conflict. If set to true, when fetching and integrating changes from a remote repository, a conflicting merge is canceled and the working tree left untouched.
  • disableBranchWithChanges: disable all branch operations, such as creating a new branch or switching to a different branch, when there are changed/staged files. When set to true, this setting guards against overwriting and/or losing uncommitted changes.
  • displayStatus: display Git extension status updates in the JupyterLab status bar. If true, the extension displays status updates in the JupyterLab status bar, such as when pulling and pushing changes, switching branches, and polling for changes. Depending on the level of extension activity, some users may find the status updates distracting. In which case, setting this to false should reduce visual noise.
  • doubleClickDiff: double click a file in the Git extension panel to open a diff of the file instead of opening the file for editing.
  • historyCount: number of commits shown in the history log, beginning with the most recent. Displaying a larger number of commits can lead to performance degradation, so use caution when modifying this setting.
  • refreshIfHidden: whether to refresh even if the Git tab is hidden; default to false (i.e. refresh is turned off if the Git tab is hidden).
  • refreshInterval: number of milliseconds between polling the file system for changes. In order to ensure that the UI correctly displays the current repository status, the extension must poll the file system for changes. Longer polling times increase the likelihood that the UI does not reflect the current status; however, longer polling times also incur less performance overhead.
  • simpleStaging: enable a simplified concept of staging. When this setting is true, all files with changes are automatically staged. When we develop in JupyterLab, we often only care about what files have changed (in the broadest sense) and don't need to distinguish between "tracked" and "untracked" files. Accordingly, this setting allows us to simplify the visual presentation of changes, which is especially useful for those less acquainted with Git.

Server Settings

  • Post git init actions: It is possible to provide a list of commands to be executed in a folder after it is initialized as Git repository.

In ~/.jupyter/jupyter_notebook_config.py:

c.JupyterLabGit.actions = {"post_init": ["touch dummy_init.dat"]}

Or equivalently in jupyter_notebook_config.json:

{
  "JupyterLabGit": {
    "actions": {
      "post_init": ["touch dummy_init.dat"]
    }
  }
}

Troubleshoot

Before consulting the following list, be sure the jupyterlab_git server extension and the @jupyterlab/git frontend extension have the same version by executing the following commands:

jupyter server extension list
jupyter labextension list

If they do not match or one is missing, please reinstall the package.

  • 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/settings?version=0.20.0

      Explicitly enable the server extension by running:

      jupyter server extension 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
      

      If you see @jupyterlab/git, your installation may have been corrupted. You can run jupyter lab clean --all and reinstall all your extensions.

Contributing

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

JupyterLab follows the official Jupyter Code of Conduct.

Development install

Note: You will need NodeJS to build the extension package.

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
git clone https://github.com/jupyterlab/jupyterlab-git.git
# Change directory to the jupyterlab-git directory
cd jupyterlab-git
# Install package in development mode
pip install -e .[dev]
pre-commit install
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm run build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

To execute the tests

pytest jupyterlab_git
jlpm run test

Contributors ✨

The Jupyter Git extension is part of Project Jupyter and is developed by an open community of contributors. To see who has been active recently, please look at the "Contributors" tab. Below we list the people and entities who contributed in different ways to the project (emoji key):


Brian E. Granger

📆 🎨 🤔 🔍

Saul Shanabrook

💻 📆 👀 🚇

Jaipreet Singh

📆 👀 💻 🎨

Frédéric Collonval

🚧

jupytercalpoly

🤝

Amazon Web Services

🤝

The D. E. Shaw Group

🤝

Ji Zhang

💻 👀

Hana Zarea

💻 👀

Noah Stapp

💻 👀

Ashutosh Bondre

💻 👀

Neelam Gehlot

💻 👀

Konstantin Taletskiy

💻 👀

Max Klein

💻 👀 📆 🎨 🚇

Athan

💻 👀 📆 🎨

Ian Hunt-Isaak

💻 👀

This project follows the all-contributors specification. Contributions of any kind are welcomed!

To add yourself, or someone else, to this list you can either use the bot (@all-contributors please add <username> for <contributions>) or the CLI (jlpm all-contributors add <username> <contributions>).

If you manually edit the .all-contributorsrc config file, run yarn run contributors:generate.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].