-
Notifications
You must be signed in to change notification settings - Fork 334
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
Variable inspector / workspace view #64
Comments
This is something I've thought about a lot, and it's something I'd love to I'm probably going to be working with the Jupyter team to improve the How are you thinking of implementing this? |
I would love to see this as well. I really want to move away from Spyder (especially given its recent problems with Windows 10) but the variable explorer keeps me using it. Hydrogen with the watch list is a huge step in the right direction, but its not quite the same thing. |
This comment has been minimized.
This comment has been minimized.
I'd love to see this too. I've been tracing through Jupyter trying to figure out what would be necessary to support this sort of case globally and it seems like it could potentially be extremely complicated. The jupyter_client spec would need to implement some concept of a "variable". In the most basic case this would map to the contents of Python's I'm wondering if an alternative to waiting for all this infrastructure might be to build out the watch list into a more automated UI. For instance, can we piggy-back on Atom's grammars to determine if the user's cursor is on a variable and display an "Watch this variable" button popup? Or maybe it's in the right-click menu? |
Jupyter is used for teaching and not highefficient programming, so maybe let's add continuous evaluator of all grammars? And display just meaningful ones. In dynamic languages only way to get the scope of selected piece of code is to launch it to this line included. And that only if code is imperative. So hidden launch of code would be best solution, but what if I modify filesystem with my code? |
@onyxfish "Add watch" command was merged into master. But what about scopes? |
@willwhitney any updates on your work with the jupyter team and whether this feature is likely to be added in the near future? |
Don't hold your breath — this idea is on the back burner right now, as I'm finishing up a thesis and the Jupyter team is in the throes of a refactor. However, if you're interested in pitching in on the Jupyter side of things, they love PRs! |
I have a proof-of-concept that implements a basic variable inspector using the just-merged plugin API updates: https://github.com/nikitakit/hydrogen-python It should be quite doable to turn this into a fully-working plugin. That said, I'm not sure what the priority features for a variable inspector are, besides showing basic variable info. Existing environments offer a bunch of capabilities for editing/plotting/saving/loading, but I have no idea which of these features actually see non-trivial use. |
Wow, this is awesome! 🍾 From my own experience, I did never used these kind of advanced features in MATLAB® etc., type and shape is pretty much all I need... so you nailed it 👍 I will have a detailed look later and I guess it makes more sense to continue discussion in the python plugin |
Great work @nikitakit! Do you want to add a link to this package to our readme? After that I think we're good to go and make a new release so people can try it out. |
This is great! It's one of the things I most wished I could add when I was first building Hydrogen. Awesome work @nikitakit! |
@nikitakit This is really nice. Save and load is crucial I think. Many people use python for data science and machine learning tool. So, save and load a workspace is really useful. |
So this would be a fantastic feature especially if it were more fluidly available i.e., opening up once workspace is populated by user defined variables. Nevertheless, I managed to toggle it on and recieved...
|
@ktavabi The command you need to run is |
so awesome work @nikitakit - I was looking at this code base - and looking to plug in the ipython capabilities to like spyder ide then read that there's nteract which has plotly all out of the box with nice ui candy. my use case is I want to launch tensorflow training python app from terminal and be able to inspect variables print graphs / dataframes like spyder ide. my goto editor is visual studio code - but they don't want anything to with a variable explorer - |
hi, I am new to this. How do you open this feature? I am using atom with python 3 kernel, where do you run Hydrogen Python: Toggle Variable Explorer ? in script or? @nikitakit |
Press ctrl-shift-P to bring up the command palette. That's where you run all the Atom commands. You also need to install the |
Hi, I'm new to Atom and Python...I followed the instructions on this thread, but I'm unable to get the Variable Explorer to show up. Hydrogen is working fine otherwise. Any advise. I have entered the command from the command palette (typing the command). I can't see the command to show up. I also created shortcut for this command "hydrogen:toggle-variable-explorer", but it doesn't work either. Any clue on how to troubleshoot the installation of this plugin? Thanks! |
@nikitakit I'll add my vote for this being a useful feature. As for which other features see nontrivial use, I would say priority 1 is ability to just see the variable and the size/shape of arrays is my biggest use, so you have it! Thanks @hmanuel1 I also did not see the hydrogen command initially, but it should show up in the command palette autocomplete after you install the package hydrogen-python. You probably need to restart hydrogen after installing the package. |
Is there any planning to make this really useful feature also available for R? (as described in #628 I mean) |
The variable explorer is a very useful tool, I noticed that for python pandas DataFrames doesn't resolve their size. |
The plug-in can only see surface data, not specific data. For example, when you create a new Pandas DataFrame, you cannot see the data in it, and it is the same with numpy array. |
I love the idea of hydrogen, and I think this is good step into the right direction towards atom as a scientific dev environment! Thanks for the work so far.
One step further additionally to the "watch" mode would be to list variables of the current scope. The result would then be a variable / workspace view which automatically refreshes so users get a quick view on all their variables and their content. This view could also allow to click on the variables to show the content of arrays, images, matplotlib plots etc...
This would reflect something which is common in IDE's like Spyder or Matlab (see screenshot)
This has been added to the Hydrogen Wiki Plugins. If you close this issue please remove it from the Hydrogen Wiki.
The text was updated successfully, but these errors were encountered: