Skip to content
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

Closed
jjoonathan opened this issue Oct 16, 2019 · 3 comments
Closed

jupyterlab-jupytext should complain if no jupytext #350

jjoonathan opened this issue Oct 16, 2019 · 3 comments
Milestone

Comments

@jjoonathan
Copy link
Contributor

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.

@mwouts
Copy link
Owner

mwouts commented Oct 16, 2019

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.

@jjoonathan
Copy link
Contributor Author

jjoonathan commented Oct 17, 2019

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!

@mwouts mwouts added this to the 1.3.0 milestone Oct 31, 2019
@mwouts
Copy link
Owner

mwouts commented Oct 31, 2019

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

  • be even clearer than most users do not need to install the extension (as it is bundled with the python package)
  • document the last version of each part of Jupytext (pip versus npm, I was asked a few time why the version numbers differ...)

@mwouts mwouts reopened this Oct 31, 2019
mwouts added a commit that referenced this issue Nov 3, 2019
Also explain the different version numbers
Closes #350 #311
@mwouts mwouts closed this as completed in ccab1a9 Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants