GithubHelp home page GithubHelp logo

gitcheckpoints's Introduction

GitCheckpoints

Requirements:

Jupyter Notebook
Git

Installation (from repository):

git clone https://github.com/csiro-scientific-computing/GitCheckpoints.git gitcheckpoints
cd gitcheckpoints
python setup.py install
add this line to Jupyter config:
    c.FileContentsManager.checkpoints_class = 'gitcheckpoints.GitCheckpoints'

gitcheckpoints's People

Contributors

eliemichel avatar smoskwa avatar

Stargazers

Qcy avatar Allen.YL avatar Luis Bronchal avatar Aaron O'Leary avatar Carl Osterwisch avatar Ian Barfield avatar  avatar

Watchers

Xavier Ho avatar James Cloos avatar Luke Domanski avatar Josh Bowden avatar Daniel Collins avatar  avatar Alex Kruger avatar Maciej Gołębiewski avatar

gitcheckpoints's Issues

Handle --notebook-dir argument

git commands are called within the directory in which ipython is running, note the notebook's root directory.

So it fails when calling ipython with the --notebook-dir command line argument.

Here is an example of error log:

[E 13:28:16.865 NotebookApp] fatal: /tmp/notebooks/Untitled.ipynb : '/tmp/notebooks/Untitled.ipynb' is outside the repository
    Traceback (most recent call last):
      File "/usr/lib/python3.4/site-packages/gitcheckpoints-0.1-py3.4.egg/gitcheckpoints/gitcheckpoints.py", line 44, in create_checkpoint
        subprocess.check_output(['git', 'add', src_path], stderr=subprocess.STDOUT)
      File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
        raise CalledProcessError(retcode, process.args, output=output)
    subprocess.CalledProcessError: Command '['git', 'add', '/tmp/notebooks/Untitled.ipynb']' returned non-zero exit status 128

__init__ import GitCheckpoint. ?

I would import gitchechpoint in init.py to lower the nesting and long key in configuration.

Note that the configuration can also be done using json file, which is easier to do programatically.

Here is roughly how I do it, could be improved though.

Again, these are details that could be done only when one want to polish the project,
or have easy things for new contributors.

Restore checkpoint detached head state ?

IIUC restoring checkpoint will checkout, which should put you in a detached-head state,
which might not be the actual goal.

Would it be smarter to (commit?) , create branch name , reset --hard <comittish> ?

But that's a detail.

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.