Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion on implementing directed acyclic graph-like structure in notebooks #118

Open
jd41 opened this issue Jan 26, 2021 · 2 comments
Open

Comments

@jd41
Copy link

jd41 commented Jan 26, 2021

I want to work/get advised on a project to support a directed acyclic graph-like structure between cells in Jupyter notebook, and set up a Zoom meeting with other interested people. See jupyter/notebook#1175 for former discussion by other people - I also brought this topic up in the January 13th JupyterLab development meeting.

What I currently roughly have in mind (of course, open to discussion, I am also happy to present something by screensharing):

  1. Each cell n is annotated with metadata specifying which cells it depends on (e.g. because cell n only works if a prerequisite cell calculated an array), and this is displayed visually (e.g. by arrows) in the notebook (I am not sure how to make this look good without overloading the UI at the moment - maybe some part of the screen that can be toggled, like the Table of Contents in Adobe Reader?)
  2. Explanatory cells/titles can also be part of the directed acyclic graph, which is hopefully useful in making the notebook's logical structure clearer to a human. If a human wants to understand only some results, they may save time by not following the entire notebook.
  3. If you click the "+" button (which adds a new cell) while cell n is in-focus, the new cell is automatically designated "dependent on cell n"; the user can add further dependencies manually.
  4. If you change a cell's code, all descendants get visually marked as stale; there is an option to "recalculate all stale cells" or suchlike.
  5. features in a cell n's dropdown menu:
    • Show dependent cells (so you can see how the variables that cell n uses are defined),
    • hide all cells that are not necessary to calculate cell n. As in point 2, in a notebook like this one, this can save time for a reader who wants to understand only some of the results.
@bollwyvl
Copy link

You may want to check out: https://github.com/cphyc/node_editor

There is also something of a discussion going on about it on gitter:

https://gitter.im/jupyterlab/jupyterlab?at=600e9a586b20cf7730d7d5b6

(can't find the origin of the thread, mostly about re-using parts of JupyterLab)

@meeseeksmachine
Copy link

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/dag-based-notebooks/11173/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants