mwouts / jupytext

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

jupytext pairing missing in Jupyterlab 4.0 command pallete #1067

Closed WillTarran closed 1 year ago

WillTarran commented 1 year ago

It appears that pairing with plain text formats is not working in the latest version of jupyterlab. Following the documentation instructions which indicate pairing commands should be available in the Command Pallete, nothing is showing (see screenshot).

Screenshot 2023-05-30 at 16 58 00

This is in a recently built python virtual environment in a docker image, installing the latest jupyterlab and jupytext. System information and Jupyter related package versions are as shown:

$ uname -a
Linux 5b5bc456187f 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ pip list | grep jupyte
jupyter_client           8.2.0
jupyter_core             5.3.0
jupyter-events           0.6.3
jupyter-lsp              2.2.0
jupyter_server           2.6.0
jupyter_server_fileid    0.9.0
jupyter_server_terminals 0.4.4
jupyter_server_ydoc      0.8.0
jupyter-ydoc             0.2.4
jupyterlab               4.0.1
jupyterlab-pygments      0.2.2
jupyterlab_server        2.22.1
jupytext                 1.14.5

It appears this may relate to the new Jupyterlab v4, since if I downgrade (with `pip install "jupyterlab<4.0") I can now pick up the extension commands. New package versions and screenshot below

$ pip list | grep jupyte
jupyter_client           8.2.0
jupyter_core             5.3.0
jupyter-events           0.6.3
jupyter-lsp              2.2.0
jupyter_server           2.6.0
jupyter_server_fileid    0.9.0
jupyter_server_terminals 0.4.4
jupyter_server_ydoc      0.8.0
jupyter-ydoc             0.2.4
jupyterlab               3.6.3
jupyterlab-pygments      0.2.2
jupyterlab_server        2.22.1
jupytext                 1.14.5
Screenshot 2023-05-30 at 16 51 46
krassowski commented 1 year ago

There seems to be an earlier issue tracking 4.0 compatibility here: https://github.com/mwouts/jupytext/issues/1054

WillTarran commented 1 year ago

Ah - sorry, my bad. I did have a look through existing issues, but missed that one. Indeed, I think this is just a compatibility issue for v4, so I assume will be sorted when the work discussed in #1054 is complete. I guess we can close this issue then?

mwouts commented 1 year ago

Hello @WillTarran , thank you for documenting this. Yes you're right this is the same issue as the other one. Can you please leave it open for now ? It will make it easier for people facing this issue to find out that this is a work in progress. Hopefully we can address this in the coming days.

rschwarz commented 1 year ago

I have the same issue, however I can still use the command-line jupytext tool to add the pairing and then open the text files as notebooks just fine.

mwouts commented 1 year ago

Yeah, this is still a work-in progress.

What we have at the moment is an alpha version of the extension for JupyterLab 4 - see this comment.

mazzma12 commented 1 year ago

Thank you for reporting, I was wondering why jupytext did not show up after upgrade to jupyter lab 4.0.

I have the same issue, however I can still use the command-line jupytext tool to add the pairing and then open the text files as notebooks just fine.

Thanks for the tip this command should help to sync from py to ipynb

jupytext --set-formats py,ipynb --sync explo.py
mwouts commented 1 year ago

This has been solved in jupytext==1.15.0. Thanks to @parmentelat , the embedded extension is now compatible with both JLab 3 and 4!

Those who installed the temporary workaround will need to uninstall it. In other words, the new instructions are

pip uninstall jupyterlab-jupytext
pip install 'jupytext>=1.15.0'