-
Notifications
You must be signed in to change notification settings - Fork 393
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
Use skip_if_exists from jupyter-packaging #705
Comments
Oh interesting! Thank you @martinRenou . Out of curiosity, is there any argument against having jupyterlab and node as dependencies in the build step of |
It's just fine keeping things as they are right now 😊 |
Well finally @martinRenou I might be interested... I saw that So just tell me, with |
Well, maybe you can get rid of pre-commit hooks 😉 All jokes aside, yes the
What kinds of commands are you willing to run in the pre-commit hooks? Maybe it's not worth running |
Thanks @martinRenou . Well before jupyter-packaging we had the I'd be happy to learn exactly how Finally, a word on the pre-commit hook:
|
Do I understand that jupytext installs pre-commit hooks on the user machine? It's not something you use for developing jupytext?
Why does it need to install jupytext in the first place?
Yes that's what I meant. |
Indeed, the pre-commit hook that we are discussing here is not the one that we use for developing Jupytext. It will be a hook dedicated to Jupyter notebooks and will essentially do Thanks for pointing out at |
I don't think Why is the hook installing jupytext? Shouldn't you assume it's already installed in your case? |
pre-commit installs hooks in their own sandboxes, from a provided hook repository (in this case mwouts/jupytext). This is a one-ish time action, it doesn't run on every commit. However, since it's installing from source, and the source install now requires this nodejs stuff, the hook itself comes to depend on nodejs which isn't reasonable. In any case it seems like this should be an optional extra, also for contributors who aren't developing the extension but only the cli (for example). I don't know by which mechanism that can be achieved, though. |
Well if I knew how to pass arguments to |
Also, I see that |
Could it somewhat be installed from PyPi instead of from sources?
I totally agree with this. Jupyterlab-lsp is another package with a very similar workflow. This time the setup.py does not depend on nodejs: https://github.com/krassowski/jupyterlab-lsp/blob/master/python_packages/jupyterlab_lsp/setup.py it will simply install the already built labextension. This labextension must be built separately though, but we could think of a mechanism for which jupytext's Python would be installed without the nbextension/labextension. |
Not afaik, as it uses git for deciding which revision to install and also because it depends on the |
Locally I am having some success with #708. Do you deem that as acceptable? |
Looks acceptable to me :) Just a note that |
Thank you @martinRenou . Well I've added an |
This is not mandatory for the extension to work.
In order to prevent the jupytext-feedstock to build the labextension and the nbextension (hence not depend on jupyterlab and nodejs), we can use jupyter-packaging's
skip_if_exists
function which allows us to skip the build. In that case we need to ship the nbextension and labextension as part of the sdist.The text was updated successfully, but these errors were encountered: