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: let Parsons problems include imports #4

Open
nmstoker opened this issue Sep 4, 2022 · 1 comment
Open

Feature: let Parsons problems include imports #4

nmstoker opened this issue Sep 4, 2022 · 1 comment

Comments

@nmstoker
Copy link

nmstoker commented Sep 4, 2022

I struggled to get Parsons problems that feature imports working but that feature might be useful, both for fairly simple Standard Library related examples (eg involving say import math) and for those involving other modules.

It should be feasible, so long as the modules to be imported to Pyodide are:

  1. The Standard Library modules that Pyodide includes or...
  2. Pyodide's additional built-in packages
  3. Additional third party packages (so long as Pyodide can successfully load them as per here for PyPI or here for arbitrary URLs)

I've got a fairly basic solution that works for 1 (see below) and am having a look at 2 now. If 2 works then 3 shouldn't be that much harder but maybe 3 is adding too much complexity / risk of going wrong for a simple training tool?!

@pamelafox
Copy link
Owner

Did you have to make any changes for 1/2? For 3, we could add support for the most common ones, like numpy and pandas, if we agreed to only load them conditioned on the code needing them. It'd involve a hard-coded list of wheels I think.

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