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

Add ability to refresh/update existing Variable Explorer windows to reflect current variable state #6325

Closed
Murmele opened this issue Jan 29, 2018 · 19 comments · Fixed by #21312

Comments

@Murmele
Copy link

Murmele commented Jan 29, 2018

Hello,
when you click on a variable in the variable explorer you get a new window from the variable and it's content (see pic1.png). At the moment these small windows will not be updated when the variable changes. In some cases it is really usefull to compare values, but sometimes it would be nice when the windows will be updated. For this i propose if there is a checkbox which is by default unchecked, but when you check the checkbox, the content of the window will be updated.
Is something like that possible to make?

pic1

pic2

@ccordoba12
Copy link
Member

Thanks for the suggestion. We'll try to implement this in a future release.

@Murmele
Copy link
Author

Murmele commented Jan 29, 2018

Thank you!

@CAM-Gerlach
Copy link
Member

Agreed, this would definitely be a very useful feature and something I've thought about as well, though would take at least some backend work to implement. Also, from a UI perspective, It would probably be easiest and most straightforward to stick the button bottom left.

@CAM-Gerlach CAM-Gerlach changed the title Feature: Add Checkbox to synchronize variable explorer Add ability to refresh/update existing Variable Explorer windows to reflect current variable state Jan 30, 2018
@ccordoba12 ccordoba12 modified the milestones: v3.2.8, v3.2.9 Mar 3, 2018
@ccordoba12 ccordoba12 modified the milestones: v3.3, v4.0beta3 May 22, 2018
@Heuristicmystic
Copy link

Absolutely loved this in the old Linux build I used

@ccordoba12 ccordoba12 modified the milestones: v4.0beta3, v4.0beta4 May 18, 2019
@ccordoba12 ccordoba12 modified the milestones: v4.0betaX, future Aug 11, 2019
@goanpeca goanpeca removed this from the future milestone Feb 23, 2020
@rpinto73
Copy link

rpinto73 commented May 26, 2021

Adding my support for this feature to be added in the future! Thanks

Btw a huge thanks to the entire team that updates and maintains Spyder!

@ccordoba12
Copy link
Member

Thanks for your kind words @rpinto73!

@a4bears
Copy link

a4bears commented Jul 22, 2021

Yes!! This would be super useful

@wwhoward
Copy link

Would love to see this.

@ajauskas
Copy link

Still doesn't exist, right? That would be quite useful for me.

@BerezhnoyD
Copy link

Will add my upvote. Adding this functionality would be great. Thank you for maintaining Spyder.

@EdSaiedi
Copy link

Will add my upvote too for such a feature. Coming from a Stata background, autorefreshing is key for understanding the data. Given the comment of a user here, users switch to other programs like Sublime due to such an issue. Perhaps implementation could start with smaller dataframes, if a concern is the processing power an autorefresh function would use up?

@anton2qr4q
Copy link

This would be incredibly helpful

@anton2qr4q
Copy link

anton2qr4q commented Oct 27, 2022

Will add my upvote too for such a feature. Coming from a Stata background, autorefreshing is key for understanding the data. Given the comment of a user here, users switch to other programs like Sublime due to such an issue. Perhaps implementation could start with smaller dataframes, if a concern is the processing power an autorefresh function would use up?

@EdSaiedi I don't think Sublime can do it, think he is just saying he will stick with Sublime and print to console.

Have you had any luck finding an alternative? Thanks

@Artyom-K
Copy link

I would also like the global setting for all these windows. Most of the time I would like them to be autorefreshed but sometimes I need to compare values for different runs.

@ccordoba12
Copy link
Member

ccordoba12 commented Mar 16, 2023

Unfortunately, we can't make this work automatically because it'd consume a lot of memory. Every operation that shows a variable in one of our specialized viewers involves making a copy of it. That copy is cleared once users close the viewer.

But if viewers are maintained opened and they're being updated after every code execution, the memory consumed by Spyder can skyrocket quite quickly, especially for large variables.

So, I think the best we can do is to add a refresh button to our viewers, so users can update them on demand. We'll try to do that in the future.

@anton2qr4q
Copy link

anton2qr4q commented Mar 16, 2023 via email

@bajhuman
Copy link

This would be a very useful feature, i.e. allowing only one open view per variable and updating that variable as code gets executed rather than pressing refresh.

@ccordoba12
Copy link
Member

@bajhuman, please read my previous comment: that can't be done because it'll increase the memory consumed by Spyder without limit.

@jitseniesen jitseniesen self-assigned this Aug 11, 2023
@jitseniesen
Copy link
Member

I made a prototype in order to get an idea of what is involved. In the video, I define an array arr, open an array editor, give the command arr = numpy.flipud(arr) (which flips the array upside down) and then refresh the array editor.

refresh-demo.mp4

Feel free to comment on the UI/UX. Note that the command arr = numpy.flipud(arr) does not mutate the array but it assigns the variable to a new array. I think that users will expect the array editor to show the new array, but let me know if you disagree.

My code does work, but it is easy to break (this is a MVP for a very low value of V). This is going to be more work than I had thought. These situations are currently not handled (and probably more):

  • collection, object or dataframe editors
  • arrays nested in other objects
  • changing the type of the variable or deleting it
  • changing a normal array to a record, masked, or 3d or vice versa
  • changing the number of rows or columns
  • changing the maximum or minimum value in the array
  • editing the array in the editor and then refreshing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment