jupytext icon indicating copy to clipboard operation
jupytext copied to clipboard

jupytext and jupyter lite ?

Open parmentelat opened this issue 1 year ago • 5 comments

Hi; I am currently experimenting with jupyter lite, and found that jupytext apparently does not work in this context at the moment

I am curious to hear of others who would have this interest too, to share experiences and possibly best practices

parmentelat avatar Apr 25 '24 21:04 parmentelat

Hi @parmentelat , thanks for opening this thread. I see are at least two difficulties for providing the current Jupytext in Jupyter Lite a) The context manager for Jupyter Lite seems to be very different from the Jupyter Lab one (e.g. it's coded in Javascript, while Jupytext's contents manager is written in Python) b) I don't know how to distribute a Python package for pyodide. I tried

import pyodide_js
await pyodide_js.loadPackage('jupytext')

but it failed with the following error: JsException: Error: No known package with name 'jupytext'

Possibly it would make sense to code another converter from scratch in TypeScript, but I am afraid I don't have the skills nor the time to do so. @jtpio do you have any thoughts on the subject?

mwouts avatar Apr 27 '24 10:04 mwouts

Hey @mwouts - hope you're doing fine

well, as far as skills I am unfortunately not the right person either :)

I was just raising this because I thought I might not be the only jupytext addict to start playing with jupyterlite, given that it is becoming a more and more viable and appealing option...

parmentelat avatar Apr 29 '24 18:04 parmentelat

Same here: can't wait to have jupytext in jupyterlite. IIRC from last time I tried, it's not far from working: using the conda-based jupyterlite xeus, I could just pull jupytext by listing it in the pip dependencies in the environment. And then I could open a markdown notebook with Open With.

nthiery avatar May 20 '24 14:05 nthiery

Cross referencing discussions:

  • https://github.com/jupyterlite/jupyterlite/discussions/731
  • https://github.com/jupyterlite/jupyterlite/issues/1301

nthiery avatar May 20 '24 14:05 nthiery