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

Switch to the upstream JupyterLite REPL app #557

Merged
merged 2 commits into from
Feb 18, 2022
Merged

Conversation

jtpio
Copy link
Contributor

@jtpio jtpio commented Feb 15, 2022

Brief description of what is fixed or changed

Follow-up to #547 and #556

JupyterLite now ships with the repl app by default:

This PR updates the "Try NumPy" section:

  • The URL of the interactive code console now points to the JupyterLite demo repo: https:/jupyterlite.github.io/demo/repl/?toolbar=1&kernel=python&code=import%20numpy%20as%20np
  • Remove the "Enable" button, since updating to the upstream code console also fixes the scrolling issue initially reported in Use JupyterLite to try numpy in the browser #547 (comment)
  • Clean up unused styles
numpy-org-update.mp4

A follow-up to this would be to start making a custom JupyterLite deployment that can then be hosted in the numpy GitHub organization, for example at https://github.com/numpy/try or https://github.com/numpy/jupyterlite-repl.

The custom deployment can easily be done using this template repo: https://github.com/jupyterlite/demo

@netlify
Copy link

netlify bot commented Feb 15, 2022

✔️ Deploy Preview for numpy-org ready!

🔨 Explore the source changes: 59a5863

🔍 Inspect the deploy log: https://app.netlify.com/sites/numpy-org/deploys/620b92dd4347730007351872

😎 Browse the preview: https://deploy-preview-557--numpy-org.netlify.app

@stefanv
Copy link
Contributor

stefanv commented Feb 17, 2022

Thanks @jtpio! This looks good.

Can you expand on the advantages of a custom JupyterLite deployment?

I'm still a bit worried about the downloads here: at >15MB per notebook load, your jupyterlite.github.io server may be hit with much greater than the 100GB soft limits that GitHub has in place. So, may make sense to (a) load the terminal on demand and (b) put a cache such as Cloudflare in front of your pages.

@jtpio
Copy link
Contributor Author

jtpio commented Feb 18, 2022

Can you expand on the advantages of a custom JupyterLite deployment?

A custom deployment gives more control on the version of JupyterLite being used, the configuration, custom settings and the set of extensions available.

And this could also help deploy it on Netlify alongside the rest of the website if desired.

I'm still a bit worried about the downloads here: at >15MB per notebook load, your jupyterlite.github.io server may be hit with much greater than the 100GB soft limits that GitHub has in place. So, may make sense to (a) load the terminal on demand and (b) put a cache such as Cloudflare in front of your pages.

Normally the size of the assets downloaded from https://jupyterlite.github.io/demo should be a bit smaller than 15MB:

image

Also these should be cached by the browser on subsequent visits. Also part of the downloads includes Pyodide, which is fetched from cdn.jsdelivr.net.

Option a) might have the downside of reintroducing some waiting time if the assets and the kernel initialization is triggered on user action and not pre-fetched in the background?

@stefanv stefanv merged commit 2eb3bee into numpy:main Feb 18, 2022
@stefanv
Copy link
Contributor

stefanv commented Feb 18, 2022

Thanks @jtpio!

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

Successfully merging this pull request may close these issues.

2 participants