Add stale cells (aka single-shot cells)#3068
Open
SimonLafran wants to merge 1 commit intoJuliaPluto:mainfrom
Open
Add stale cells (aka single-shot cells)#3068SimonLafran wants to merge 1 commit intoJuliaPluto:mainfrom
SimonLafran wants to merge 1 commit intoJuliaPluto:mainfrom
Conversation
Adds to PlutoRunner a new struct `Stale`. When returned from a cell, this struct passes down its formatting to its single member `out`. However, the cell also gets marked as stale. This means that none of the cells that depend on it will be run. The stale cell, however, will still be run when its dependencies run. On the frontend stale outputs are displayed on a light or dark orange background while stale cells and cells that depend on them get orange traffic lights. When a cell is in one of those two states a warning sign with an explanatory popup is displayed below the "fold code" button. Add a small test for stale cells
Member
|
Hey @SimonLafran! Let's have a call? Send me an email on fons@plutojl.org |
Member
|
Notes from our call: Integrated approachThe single shot feature can be integrated into the existing disabled-cells feature! Disabled cells will get a button to "run once" (and stay disabled). For this, we would also improve the existing disabled feature:
ImplementationThe "run" command from the frontend can contain a list of single-shot ids. The disabled status of those cells will be ignored during the run. ConflictIt's possible that a cell depends on two disabled cells, and you single-shot one of them. We need to decide what to do here. |
|
I am really interested in this feature. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #2970 and previous discussions, having a way to temporarily block the execution of long-running cells would be beneficial.
This implementation goes for a very flexible solution:
Main.PlutoRunner.Stale. When returned from a cell, this struct passes down its formatting to its single memberout. However, the cell also gets marked as stale. This means that none of the cells that depend on it will be run. The stale cell, however, will still be run when its dependencies run, to see if its no longer stale.On the frontend stale outputs are displayed on a light or dark orange background while stale cells and cells that depend on them get orange traffic lights.
When a cell is in one of those two states a warning sign with an explanatory popup is displayed below the "fold code" button.
(see picture below)
Small details
Future
We could add utility macros to PlutoHooks/PlutoLinks, something like
single-shot. This would show how to use the marker.Try this Pull Request!
Open Julia and type: