Coder Social home page Coder Social logo

Comments (10)

bollwyvl avatar bollwyvl commented on June 22, 2024 1

How about ipylite? Short, not taken, decent mashup of the two?

from jupyterlite.

jtpio avatar jtpio commented on June 22, 2024 1

Another option would be to use the "Python (Pyodide)" display name, similar to "Python (ipykernel)" and "Python (XPython)" in regular Jupyter.

And use the jupyterlite-pyodide-kernel package name to distribute it once it's moved to a separate repo: #386

from jupyterlite.

bollwyvl avatar bollwyvl commented on June 22, 2024

@jpio on #129

So now might be a good time to start having a minimal IPython (mostly IPython.display) that would run in jupyterlite.

Indeed! But answering the API mail exactly on #18 will need this anyway for e.g. bokeh or freaky-deaky wrapper kernels that subclass KernelBase.

So, offspring-of-pyolite probably needs to not only offer an importable IPython and ipykernel, but also distributions named ipython and ipykernel that have version-equivalence with the "real ones" on PyPI.

Further, as the pyodide one is, for the time being, by far the heaviest kernel, it ideally needs to be distributed as its own package(s), that is/are on PyPI, a la #104. So the notional real {sys.prefix}/share/jupyter of the building environment after installing these package(s) might be something like:

share/jupyter/lite/pyodide/
  ipython-7.24.0-py3-none-any.whl
  ipykernel-5.5.5-py3-none-any.whl

...and build up a compatible index similar to how we're doing contents for now.

Starting to get pretty fractal at this point, as these would also be .whls that someone could micropip.install().

cc @Carreau

from jupyterlite.

Carreau avatar Carreau commented on June 22, 2024

Happy to do changes needed in IPython and reduce the size. I doubt I'll have time myself.

from jupyterlite.

bollwyvl avatar bollwyvl commented on June 22, 2024

@Carreau No worries! I don't think we'll need any changes upstream, just alerting you that there might be another whl-in-a-whl of IPython on the horizon that only works in the browser. all the zmq stuff, etc. is basically a non-starter, and we're going to have to fake it. But luckily no windows problems!

from jupyterlite.

jtpio avatar jtpio commented on June 22, 2024

As a start we probably don't need the whole ipython, but mostly its display the module? And being able to configure or override the publish_display_data.

That would indeed also mean having the distributions as well, but those could be recreated by assembling pieces from the upstream ipython.

For ipykernel, more modularity would also benefit other projects like xeus-python, which patches the comms.

from jupyterlite.

psychemedia avatar psychemedia commented on June 22, 2024

Here's an interesting package for viewing 3D molecules in the browser — py3DMol [example] — that explicitly tests for IPython but I think only really depends on the IPyhton.display tools?

https://github.com/3dmol/3Dmol.js/blob/master/py3Dmol/py3Dmol/__init__.py

It also makes use of publish_display_data().

May be useful as an in-the-wild test case.

(FWIW, I know of quite a lot of packages out there that render widgets into notebooks using HTML/js but that don't make use of ipywidgets callbacks.)

[UPDATE: now installs and can be imported but currently fails with AttributeError: module 'IPython' has no attribute 'display' from where it makes a call to publish_display_data()]

from jupyterlite.

jtpio avatar jtpio commented on June 22, 2024

How about ipylite? Short, not taken, decent mashup of the two?

Sounds good 👍

Just booked it on PyPI: https://pypi.org/project/ipylite

from jupyterlite.

echarles avatar echarles commented on June 22, 2024

Another option would be to use the "Python (Pyodide)" display name, similar to "Python (ipykernel)" and "Python (XPython)" in regular Jupyter.

Simple and descriptive

+1

And use the jupyterlite-pyodide-kernel package name to distribute it once it's moved to a separate repo: #386

Simple and descriptive

+1

@jupyterlite/pyodide-kernel would also work.

from jupyterlite.

jtpio avatar jtpio commented on June 22, 2024

Another option would be to use the "Python (Pyodide)" display name, similar to "Python (ipykernel)" and "Python (XPython)" in regular Jupyter.

This was fixed in #685 and is already available in the latest releases.

@jupyterlite/pyodide-kernel would also work.

Yes that would likely be the name of the underlying JS package 👍

from jupyterlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.