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

✍️ Update: Describe the new python interactivity module #405

Open
1 task
gregmacfarlane opened this issue Feb 14, 2023 · 5 comments
Open
1 task

✍️ Update: Describe the new python interactivity module #405

gregmacfarlane opened this issue Feb 14, 2023 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation revised content

Comments

@gregmacfarlane
Copy link
Collaborator

What needs to be done?

We need to learn, explore, and document the new python interactivity implemented in #401. What packages can I install, and where do I install them? How much memory do we have for datasets, computations, etc. Can it output graphics?

Presumably this implementation is a pretty standard thing with its own documentation, can we just link to that?

Context

I would use this to make better and more interactive content, if I knew what it could do.

Issue Ready Checklist

  • Sufficiently defined
@gregmacfarlane gregmacfarlane added the documentation Improvements or additions to documentation label Mar 23, 2023
@strattonma
Copy link
Collaborator

strattonma commented Apr 20, 2023

Overview

  • The sandbox uses the Pyodide Python distribution.
  • Pyodide includes a default list of packages. Packages not on the list can be installed with micropip.install() if the package has a wheel on PyPI.
    • Example: Larch and Biogeme are on PyPI but not Pyodide distribution; need to test if micropip.install() works for these.
  • Packages need to be included in the PythonPanel.vue script for the sandbox to see them. For a package to be included, this list needs to be extended.

File I/O

Memory

  • Haven't got that far yet.

Limitations

@strattonma
Copy link
Collaborator

A simpler alternative to loading data and code from webserver would be to put data and code on a tutorial page.

@strattonma
Copy link
Collaborator

@billyc , I ran into trouble trying to import packages with micropip. I'm loading micropip here. I then tried invoking micropip.install('omx') here, but I'm not sure this is the right location with the various await commands that are in use.

@lmz
Copy link
Member

lmz commented May 23, 2023

pandas now loads:
image

@billyc
Copy link
Contributor

billyc commented May 24, 2023

Thanks @lmz !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation revised content
Projects
None yet
Development

No branches or pull requests

5 participants