Git Product home page Git Product logo

githubcommit's Introduction

githubcommit

githubcommit is a jupyter notebook extension enabling users push ipython notebooks to a git repo. The git button gets displayed in the notebook toolbar. After saving any notebook the user can push notebook to pre-specified git repository. There are few environment variables that must be exported. Currently this extension supports commits to a single github repo defined in environment variable but in the long run need help to modify this extension allowing user to select his repo and branch.

Installation

You can currently install this directly from git:

pip install git+https://github.com/sat28/githubcommit.git
jupyter serverextension enable --py githubcommit
jupyter nbextension install --py githubcommit

To enable this extension for all notebooks:

jupyter nbextension enable --py githubcommit

Steps

  • Install package using above commands
  • Create Git repo where notebooks will be pushed if not already exists and clone it in your GIT_PARENT_DIR
  • Clone this repo as well in your GIT_PARENT_DIR directory
  • Replace the values in env.sh present in this repo itself
  • Run the command - source ~/githubcommit/env.sh
  • Configure ssh key (present in ~/.ssh/id_rsa.pub or specified location) in github account
  • Run jupyter notebook from within your repo directory

Example git configuration

export GIT_PARENT_DIR=~
export GIT_REPO_NAME=gitjupyter
export GIT_BRANCH_NAME=master
export GIT_USER=sat28
export GIT_EMAIL=[email protected]
export GITHUB_ACCESS_TOKEN=#access-token from github developer settings
export GIT_USER_UPSTREAM=sat28

Screenshots

Extension

Commit Message

Success Message

Credits

Thanks to https://github.com/Lab41/sunny-side-up for laying the foundation of this extension.

Thanks to https://github.com/justvarshney for support.

githubcommit's People

Contributors

sat28 avatar matthieu-pa 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.