[WIP, RFC, ANN] PlutoVariableExplorer: Inspect the variables definined in a Pluto notebook

PlutoVariableExplorer.jl creates a table of the variables in your current Pluto session.

Given my background in MATLAB, this is a feature that I have wanted for a while. Unlike MATLAB (or any other variable explorer that I have ever used), PlutoVariableExplorer.jl is aware of the dependencies between your variables. It also lets you jump to a variable definition through the pluto-links functionality.

Before I register the package I wanted to give people a chance to bikeshed the name or suggest an umbrella package that this functionality could be included in. Feel free to leave any suggestions/feedback here or on Github :slight_smile:

I’d like to thank @fonsp and others for all their work on Pluto and related tools. If Pluto wasn’t such a high quality product, then this work would be much harder and much less rewarding.

From the package README:

Interactively inspect your workspace values and topology in a Pluto session.

Usage

Create the following cells: (for now you will have to do import Pkg; Pkg.add(url="https://github.com/JackDevine/PlutoVariableExplorer.jl") first)

import PlutoVariableExplorer as PVE
@bind _update PVE.update_notebook()
_update; PVE.variable_explorer(PlutoRunner)

If you dont create the _update variable, then the variable explorer will only be updated when you run the cell that defined it. The _update variable will change every time you press Shift+Enter.

Example view of the variable explorer:

Link to the repo

Some known issues

There are some open issues that I am not sure how to fix:

EDIT I also remembered an issue with how pluto-links are handled

I should be able to come up with solutions to these problems in my own time, but any advice or help would be greatly appreciated :slight_smile:

Happy Plutoing and have fun using the variable explorer in your own notebooks!

28 Likes

I have missed the workspace explorer too! (but from RStudio). I even recently wrote about it in the feedback field in Pluto, so seeing this post makes me very happy. This package is going to make my life so much easier when writing Pluto notebooks, thank you! Tracking dependencies between objects listed in the inspector and links to the object definitions are two features that make this explorer even better than the equivalents in RStudio and Matlab.

I like the name, on point and descriptive. :+1: Or maybe name it PlutoWorkspaceExplorer? Just because it doesn’t only list variables but everything with a name attached.
But I think the term “Prependencies” is confusing. I suggest finding better terms for these two concepts. Maybe “parent objects” and “child objects”? I think these terms make it more obvious where the different objects are relative to each other in the dependency tree.

1 Like

Thanks for your kind words!

… maybe name it PlutoWorkspaceExplorer?

I think the term “Prependencies” is confusing. I suggest finding better terms for these two concepts. Maybe “parent objects” and “child objects”?

Thanks for these naming suggestions, they are really good and I completely agree that they are an improvement over what we have now.

I will make the parent/child change as soon as I can set aside some time.

While I agree that PlutoWorkspaceExplorer is a better name than PlutoVariableExplorer, I will wait a little bit to see if anyone has any other name suggestions, or umbrella projects to suggest before I change the name of the repository, which will break links.

Of course, don’t make such renaming decisions lightly. :slightly_smiling_face:
And glad my suggestions are helpful.

1 Like