Run Notebook by webhook

75 views
Skip to first unread message

olive...@gmail.com

unread,
Dec 23, 2016, 4:38:55 AM12/23/16
to Project Jupyter
Hi, 

i have a notebook which fetch some data via cvs-files in a git repo and makes some graphical output. Now i want that this notebook is restarted & run after each commit in the git repo. Is there a way to do this for example via a webhook? Or is there an other solution?

Thanks for help and merry Christmas!
Oli

Matthias Bussonnier

unread,
Dec 23, 2016, 8:33:53 AM12/23/16
to jup...@googlegroups.com
Hi Olivier,

If you look at nbconvert[1] you will see that it has the potential to
execute notebook in place, without a GUI.
Either using the command line : `jupyter nbconvert --in-place
--execute <mynotebook.ipynb>` (IIRC),
or via the Python API if you need something more specific.

Triggering that on push will require you to look into git
documentation. likely a post-receive-pack hook,
if remote, or a pre/post-commit one. You also might want to look at a
clean/smudge filter to trigger things on checkout.

Hope that helps. Let us know what you ended up doing.

Cheers,
--
Matthias

[1] : https://github.com/jupyter/nbconvert
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/e4a73fb8-9b17-4330-979a-4837686bce67%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

olive...@gmail.com

unread,
Jan 2, 2017, 7:45:43 AM1/2/17
to Project Jupyter
Hi Matthias, 

thanks a lot for our help! I'm now using nbconvert to do the job. For this i wrote a small flask-app to handle my webhook and then call nbconvert!

cheers, 
Oliver
Reply all
Reply to author
Forward
0 new messages