Giter VIP home page Giter VIP logo

jupyterhub-gitpuller's Introduction

nbgitpuller

Create links for one-way synchronization of a remote git repository to a local git repository, with automatic conflict resolution. Meant for use with a Jupyter server.

nbgitpuller demo

Installation

You can install nbgitpuller from PyPI.

pip install nbgitpuller

You can then enable the serverextension

jupyter serverextension enable --py nbgitpuller --sys-prefix

What is it?

nbgitpuller allows you to construct a URL that points to a remote git repository. When it is clicked, nbgitpuller will pull the contents of this repository into the user's current folder within Jupyter, while rendering a nice status page. This is especially useful when running on a JupyterHub, since it allows easy distribution of materials to users without requiring them to understand git.

Local development

You can easily set up to develop this locally, without requiring a JupyterHub. It requires python3.

  1. Clone this repository

    git clone https://github.com/data-8/nbgitpuller
    
  2. Change into it and create a virtual environment

    cd nbgitpuller
    python3 -m venv .
    
  3. Install it with symlinks, so you can easily play with it.

    pip install -e .
    
  4. Enable the jupyter notebook server extension. This provides the git-pull URL handlers.

    jupyter serverextension enable --sys-prefix nbgitpuller
    
  5. Run a jupyter notebook locally!

    jupyter notebook
    
  6. Construct a nbgitpuller URL exactly like you would for a hub, but instead of prefixing it with myjupyterhub.org/hub/user-redirect, just use localhost:8888 or whatever the url of your running notebook is. For example, the following URL would pull down a repo:

    localhost:8888/git-pull?repo=https://github.com/data-8/materials-fa17
    
  7. Make the changes you want to make, and restart the jupyter notebook for them to take effect.

jupyterhub-gitpuller's People

Contributors

yuvipanda avatar saladraider avatar ryanlovett avatar choldgraf avatar consideratio avatar albertmichaelj avatar fvd avatar carreau avatar ogrisel avatar sigurdurb avatar parmentelat avatar znicholls avatar

Watchers

Eric Charles avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.