1

I'm working in my spare time in a project with the lab of a friend. Basically they give me some raw data and I work on an iPython notebook analyzing it. We are about 6000km away. I have the notebook under version control using this IPython notebooks and git strategy.

What would be a good way for me to share the notebook with them? I'm thinking something like nbviewer, but I understand it doesn't handle authentication. I have checked this answer, but it doesn't cover what I want- I really don't want to spend my time and possibly messing up security by setting my own server and authentication, and I would like for them to be able to view the current status at any time without me having to perform any action like convert then send.

My ideal solution would be:

  • Easily accessible: with just an URL and ideally an already existing user account.
  • Private: This is unpublished data so they are not ready to share it yet.
  • Convenient: No need to perform any action on my part beyond the initial setup. No need to set up an HTML server.
4
  • What have you tried, if anything? Have you tried sharing a folder on Dropbox, Google Drive, or similar where you and your trusted party have access?
    – holroy
    Aug 5 '15 at 11:19
  • Ps, this does most likely not need software, but rather a service and might be considered off-topic for this site.
    – holroy
    Aug 5 '15 at 11:20
  • @holroy Dropbox or other file sharing service does not fit my requirements because I need them to see the rendered notebook, not the .ipynb file. They are not necessarily able to run a ipython kernel that can render the notebook
    – Adama
    Aug 5 '15 at 14:49
  • So you do not want to setup a html server, nor convert and send your file somewhere. Basically you just want it to be accessible with restricted access, without you doing anything. I think you are fresh out of options...
    – holroy
    Aug 5 '15 at 15:16
1

You could probably come up with a short routine on save or commit of the .ipynb file that ran ipython nbconvert on your file to put it into a shared with them folder on google drive or some other sharing mechanism.

One way to completely automate this process would be to add a bash script to your git project called:

.git/hooks/post-commit

with contents something like:

#!/bin/sh
#coding=ascii
# This script is automatically called after a successful commit
ipython nbconvert --to html MyNBs*.ipynb
mv MyNBs*.html /path/to/google/drive/shared/with/fred/
# You might wish to add a call to an emailer to tell "fred" to refresh

This would update a folder in your google drive, that you have previously shared with your client and given them the URL to, with the html conversion of the current notebook every time that you commit a change in git.

As noted you could also send them an email notification on each commit.

If you would like to update the html every time that you save your notebook then see these SO answers to which you could add an action of move or copy to a Google or other shared location.

4
  • OP has specified that he do not want convert and send, but I think he has revise his goals and then this would be a good suggestion
    – holroy
    Aug 6 '15 at 0:15
  • @holroy I took that as the OP not wishing any manual operations. Aug 6 '15 at 4:32
  • Neat idea to hook it on the post commit, that should do the trick
    – holroy
    Aug 6 '15 at 8:06
  • Yes, I meant no manual operation. This does exactly what I was looking for.
    – Adama
    Aug 6 '15 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.