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

[Feature]: Auto-load packages or auto-run code blocks #19

Open
HenrikBengtsson opened this issue Jun 7, 2024 · 0 comments
Open

[Feature]: Auto-load packages or auto-run code blocks #19

HenrikBengtsson opened this issue Jun 7, 2024 · 0 comments

Comments

@HenrikBengtsson
Copy link

Feature Description

Background

The webR implementation allows us to auto-load packages, e.g.

webr:
  show-startup-message: false
  repos: ["https://cran.r-universe.dev", "https://repo.r-wasm.org"]
  packages: ["seguid"]
  autoload-packages: true

However, AFAIU, this is not yet possible in the Pyodide implementation. The best I came up with is to add an initial code block;

```{pyodide-python}
#| read-only: true
await micropip.install("seguid")
from seguid import *
```

and instruct the reader to 'Run' that before anything else following, cf. https://www.seguid.org/demo-python.html.

Wish 1

It would be useful if we could do:

pyodide:
  packages: ["seguid"]
  autoload-packages: true

such that the seguid package is automatically installed and loaded from PyPI.

Wish 2

It would also be useful to be able to auto-run individual code blocks as in webR, e.g.

```{pyodide-python}
#| read-only: true
#| autorun: true
await micropip.install("seguid")
from seguid import *
```

Comment: I'm not 100% sure, but it could be what #5 is already ask for.

PS. Thanks for these awesome Quarto-Wasm extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant