-
Notifications
You must be signed in to change notification settings - Fork 392
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
jupyterlab-jupytext should complain if no jupytext #350
Comments
Hello @jjoonathan , interesting remark! I'm not so sure how one can do that (detect in the extension that the contents manager is not Jupytext's one), but maybe we can do something simpler, and possibly as helpful... Let me explain: in most cases, the user should simply NOT INSTALL the jupyterlab-jupytext extension, for the simple reason that the extension is bundled with the python package itself. The only case that I am aware of, when one must install the extension, is for backward compatibility reasons (people using Jupyter 0.35). Do you think that we could state that even more clearly on the extension package documentation? (Did you saw that page when you installed the extension?) If so, please feel free to edit this file and propose a PR. |
Good suggestion, here's a PR. I looked into adding a check and quickly convinced myself that you were right about it being nontrivial :) I thought a bit more about why this threw me for a loop. There are several prominent conda packages that do not include their jupyterlab extension (ipywidgets and ipyleaflet spring to mind) and they have trained me to think of jupyterlab extensions as somewhat independent from the pip / conda ecosystem. Then, when I heard that there was a jupyterlab extension that did what jupytext does, I automatically went to the jupyterlab extension ecosystem as my first stop. It took me some time to figure out that jupytext wasn't a jupyterlab extension but rather a jupyter extension with a jupyterlab frontend. It's not a subtle distinction for someone who knows the jupyter ecosystem inside out, but for a casual user it's pretty subtle and for a casual user "primed" to think of it from the jupyterlab extension perspective it's doubly subtle. In any case, if you do spot an opportunity to add a check, a pinch of error detection is worth a pound of documentation. Thanks for making jupytext, I'm already loving the ability to see my notebook changes it my git history! |
Thanks @jjoonathan for the pull request. Let me reopen this to make sure that I don't forget to include that in the next release. In addition to your PR, I plan to
|
If you install jupyterlab-jupytext:
jupyter labextension install jupyterlab-jupytext
but DO NOT install jupytext:
conda install -c conda-forge jupytext # NOT run
then the jupyterlab-jupytext extension will let you run around checking "Pair notebook with...", saving, wondering why .Rmd files are failing to appear, uninstalling, reinstalling, trying different versions, generally making a fool of yourself, etc, all without complaint. Don't ask me how I know :)
It would be nice if jupyterlab-jupytext detected the condition of a missing base jupytext install and displayed an error.
The text was updated successfully, but these errors were encountered: