mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.58k stars 386 forks source link

jupytext and jupyter lite ? #1225

Open parmentelat opened 4 months ago

parmentelat commented 4 months ago

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

mwouts commented 4 months ago

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?

parmentelat commented 4 months ago

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...

nthiery commented 3 months ago

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 commented 3 months ago

Cross referencing discussions: