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 live updates for the R data explorer #283

Closed
wants to merge 11 commits into from

Conversation

jmcphers
Copy link
Contributor

@jmcphers jmcphers commented Mar 29, 2024

This change adds live updating to the R data explorer backend (like Python already has).

Screen.Recording.2024-03-29.at.10.49.35.AM.mov

Addresses posit-dev/positron#2386.

The approach is pretty simple:

  • Every time a console prompt appears, we check the data set for updates. We consider an update to have occurred whenever the underlying S-expression changes.
  • When an update occurs, we regenerate the column schemas. If they match the old schemas, it's just a data update; if they don't, it's a full schema update.
  • Column schema requests are now served from a cache; that cache is generated once when the data viewer starts and again when changes are detected.

Note that we only support live updates for cases where we know name of the variable containing the data and the environment it lives in. Also note that we don't gracefully handle the case where a variable is replaced with something that is not a data frame or matrix; in this case we need to close the comm. That's tracked in posit-dev/positron#2333.

I've also added some integration tests that run against the new functionality.

@jmcphers jmcphers requested a review from lionel- March 29, 2024 18:03
@jmcphers jmcphers closed this Apr 1, 2024
@DavisVaughan DavisVaughan deleted the feature/data-explorer-updates branch October 14, 2024 12:41
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

Successfully merging this pull request may close these issues.

1 participant