Displaying function dependency graph in iPython Notebook

252 views
Skip to first unread message

Lal S

unread,
Dec 24, 2015, 7:38:21 PM12/24/15
to Project Jupyter

I frequently use Jupyter notebook for collaborative purposes. Frequently, people write functions within their own modules that call functions from other modules, all of which are part of our library. 


An example case would be:

module1.f1 -> module2.f2 -> module3.f3 -> pandas functions.


All the functions, f1/f2/f3 follow docstring format. Is there a way to display the function hierarch f1 - f2 -f3 inside the notebook?

Thomas Kluyver

unread,
Dec 25, 2015, 5:42:04 AM12/25/15
to Project Jupyter
On 25 December 2015 at 00:38, Lal S <neels...@gmail.com> wrote:
Is there a way to display the function hierarch f1 - f2 -f3 inside the notebook?

We don't provide anything to do that, but I'm sure there are static analysis tools out there which can track those kinds of function dependencies. Then you could write some code of your own to build a graph (e.g. using NetworkX) and display it in the notebook.

Hadrien Mary

unread,
Dec 25, 2015, 4:29:55 PM12/25/15
to jup...@googlegroups.com
I don't know wether it is exactly what you are looking for but snakeviz provides this kind of visualisation as a sunburst. It has been very usefull to me to profile code.




--
Hadrien Mary

PhD in Biology
Tournier-Gachet Team
CNRS - LBCMCP - UMR 5088

Université de Toulouse - Bât. 4R3B1
118, route de Narbonne - 31062 Toulouse

--
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/5358ad53-2795-4f4a-a11c-cd0b67c06ce7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages