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

🚸 Alerting interactive notebook users for a version bump in case a notebook was already saved #122

Open
falexwolf opened this issue Dec 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@falexwolf
Copy link
Member

After saving it, somebody keeps a notebook file around locally, the hash doesn't change and hence there is no alert for a version bump, and they re-run it and then make live edits while running it. Only once they hit db$finish(), they'll get a warning that their source code changed compared to the saved version. This is annoyingly late.

We're not running into this situation with .ipynb workflows because we're requiring a version-bump whenever somebody runs ln.track("...") on an already-saved notebook in an interactive Python session. We could do the same with .Rmd and .qmd but then we'd always require version bumps even if the notebook is re-executed non-interactively. This isn't acceptable, of course.

The only way of dealing with this case, is, I think, to determine whether an R session is interactive vs. non-interactive (the equivalent of an ipython vs. a python session). We could then require the version bump for an interactive session as we do for ipython.

@lazappi
Copy link
Collaborator

lazappi commented Dec 4, 2024

I think it should be fairly easy to detect if db$track() is being run interactively but maybe harder to tell if it is in an interactive "notebook" vs a .Rmd/.qmd that is supposed to be rendered non-interactively. I'm not sure how running a chunk in an auto-knit notebook should be detected and handled compared to run the same chunk in a document that needs to be rendered to produce a HTML output.

@lazappi lazappi added the enhancement New feature or request label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants