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

Way of Creatively Handling Automatic Running of Notebooks #154

Closed
TheCedarPrince opened this issue Jun 6, 2020 · 4 comments
Closed

Way of Creatively Handling Automatic Running of Notebooks #154

TheCedarPrince opened this issue Jun 6, 2020 · 4 comments

Comments

@TheCedarPrince
Copy link
Contributor

So, I read issue #92 about not running all cells at start time. I definitely agree with the philosophy for automatically executing a notebook as a single unit. However, I have an interesting dilemma.

In one of the tutorials I am working on, I prompt the user to install certain versions of packages. I do not want this to automatically run in case the user does not want to install the packages or change their already installed package versions. This may interfere with someone's Julia installation.

I am not sure how best to handle this in keeping with Pluto philosophy. The best thing that I could think of is a Pluto provided macro that could cause a prompt or notification to appear with a specific, user-provided message that alerts someone to deciding whether or not to continue with running the notebook.

Here is an example of a notebook that I am working on that is running into this issue:

image

How do you think I should handle the matter of requirements without messing with a user's main Julia installation? Thanks!

@TheCedarPrince
Copy link
Contributor Author

This looks promising: https://github.com/QuantEcon/InstantiateFromURL.jl

I will look at this more -- might be useful to bring some of this functionality over into Pluto perhaps.

@TheCedarPrince
Copy link
Contributor Author

#142 may be relevant here.

@fonsp
Copy link
Owner

fonsp commented Jun 7, 2020

Ooh interesting link.

To me, the solution is to solve the package problem altogether - Pluto should be able to automatically resolve package silliness for you - #142

As for your current dilemma: there is no way (I think) to describe the required package environment in the same notebook where you use that environment. This is a nasty habit from Jupyter I think. The current fix (#142 will take a couple of months) is to describe the required environment in a separate file. A git repo with a Project.toml and a README with instructions would be best,

@fonsp fonsp closed this as completed Jun 7, 2020
@fonsp
Copy link
Owner

fonsp commented Jun 7, 2020

(This is also preventing us from writing cool sample notebooks)

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

No branches or pull requests

2 participants