-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Delay running the notebook when it starts #259
Comments
I wrote a bit about it here - it is also a good idea to do this by default for notebooks that were written by someone else. |
In a similar spirit I would like to have this option for running cells one-by one after loading when teaching based on a-priori prepared notebooks. |
About automatically hiding markdown: I don't this is necessary when you write your notebooks inside Pluto, but in your case (#132 (comment)), it can be done as part of the export process (the fold info is stored in the file): c = Pluto.Cell("123")
c.folded = true
# save the notebook Running cells one by one used to be the default (before d201517), but there were too many problems with this that we could not fix with friendly UI - the issue is that you launch your notebook into a broken state by default - running a cell might error depending on which cells you manually ran before. It had a lot of the same state problems as Jupyter that reactivity should solve. (The goal is not to make 'Jupyter++', but to try something else.) But if you just want the 'reveal' effect, then you can add a |
This looks good - it seems that it would be easy to set this for all markdown cells bevore saving, at least as an option.
This feels a bit awkward to me, in particular when I want to do timing examples etc. With Jupyter, I always intended to start with an empty notebook. I could guarantee that cells are in linear order and that execution is done in this order. In the spirit of c.folded, I very much would prefer to have a flag like It depends of course how much work it would be for you. I don't see much need to have a friendly UI way to fix a messed up |
Hm, you could try using |
Ok but with this, once I run the first cell, all dependants are triggered.
which gives a pretty nice initial state showing the results of folded markdown cells (I created the notebook this way). When I run the first non-folded cell, all dependants are triggered, though. Having a possibility to run the non-folded code cells one-by-one assuming linear order would be really nice for teaching based on a-priori prepared scripts (sorry for insisting...) |
Apart from the inconvenient side effects, this also has the security problem of running malicious code without the user being able to prevent it. |
Just came here to mention another use case for the delayed-execution-open: Opening a notebook for the sole purpose of copying some cells for pasting into another notebook. |
Hello I just wanted to ask if there was any update regarding this issue? Is it planned to be implemented? |
I wanted to +1 this. I have a notebook I created that does a lot and exports some data. I want to use it as a template for a new notebook with some modifications. Pluto allows a notebook to be executed without being opened; why not opened without being executed? A big button could be put up top that allows it to start executing, and then it can behave like normal. Especially because running it on Windows doesn't allow you to interrupt execution. |
Just an idea on related problem, if we can have a cell delay widget for PlutoUI, it would be awesome. For very heavy computed cells that relies on many inputs, the delay widget would act like a submit button and run the cell only when pressed. RIght now I'm doing this by having a PlutoUI.Checker() to guard the computation, I uncheck it when I don't want it to run. This works but not every convenience. |
I would like this option too. Some computations are very lengthy and its very annoying that the notebook run automatically from the start. I would like to prevent it, so I can make some change to the notebook before it run. |
This is the same issue I have, it would be nice if I could flag certain cells as being manual, without having to comment them out / remove a function call |
#1895 should help here |
This should also apply to executing JS in HTML outputs. |
Even with a prompt, it would be really easy to hide malicious code in a normal-looking notebook, when sharing the notebook via a URL. Some (extreme) ideas: SourceWe could show the URL, and ask the user: "was this link sent to you by someone you trust?" For a GitHub URL, get the username and ask if we trust this user. ContentWe could force users to review the code by showing each cell's code in sequence. (You have to click yes, yes, yes.) We can filter out cells that are empty or just markdown/html. This is quite tedious, so we could allow skipping this if the user trusts the author and source. Good alternativeDuring review, we could already propose a safe alternative: run this notebook using binder or JuliaHub. This would make it less likely that people skip proper review because they really want to run a cool notebook. |
Implemented in Pluto 0.19.30! Check out the PR #2563 for more details! |
Hi, thanks for the super awesome package. This is just some suggestion. Sometime I want to edit something before running all the cell, and there will be a very time-taking cell at the end. But stopping after the cell run is not very responsive and might kill the worker. I know I can edit the
jl
file before running Pluto but it's not very convenient. Also, with delayed run, arun all (*, above, below)
button would be nice. :)The text was updated successfully, but these errors were encountered: