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

Can we avoid "jupyterlab-jupytext needs to be included in build" ? #259

Closed
mwouts opened this issue Jun 20, 2019 · 9 comments
Closed

Can we avoid "jupyterlab-jupytext needs to be included in build" ? #259

mwouts opened this issue Jun 20, 2019 · 9 comments

Comments

@mwouts
Copy link
Owner

mwouts commented Jun 20, 2019

When we start Binder (#257), or more generally the first time we use Jupytext in Jupyter Lab, we get this message:

image

Probably we could avoid that by building the extension in a more adequate way, cf. jupyterlab/jupyterlab#4995.

@mwouts mwouts added this to the 1.1.7 milestone Jun 20, 2019
@choldgraf
Copy link
Contributor

I believe this is now fixed since the labextension install is part of postBuild now, no?

@mwouts
Copy link
Owner Author

mwouts commented Jun 20, 2019

I believe this is now fixed since the labextension install is part of postBuild now, no?

That's correct. But I think Jupyter Lab users still get this message the first time they start Jupyter Lab after having installed Jupytext. According to jupyterlab/jupyterlab#4995 I would say we can fix that. I care all the more that I am planning to update the extension - it's just a minor update, so I would be annoyed if everyone needs to rebuild the extension themselves...

@choldgraf
Copy link
Contributor

ahh - I thought you meant in binder

@mwouts
Copy link
Owner Author

mwouts commented Jun 21, 2019

I have not yet found a solution for that. Take for instance the latest RC:

pip install jupytext==1.1.7rc0

Then, unless we rebuild Jupyter Lab explicitly with

jupyter lab build

we get a similar message saying that the content of jupyterlab-jupytext have changed.

When the Lab is build, the files in the extension are deployed in a static folder in share/jupyter/lab. Maybe I could try to install these files with setup.py rather than deploying the .tgz extension... At least this is what is suggested here.

I also found that the subject of offline extension install in JupyterLab is discussed here:
jupyterlab/jupyterlab#2065.

@mwouts
Copy link
Owner Author

mwouts commented Jun 21, 2019

@blink1073 , I am trying to find a way to bundle a jupyterlab extension with my python package that would not require to rebuild JupyterLab after install.

Could you please tell me what you think of installing the extension files in share\jupyter\lab\static directly in my setup.py ?

@choldgraf
Copy link
Contributor

choldgraf commented Jun 22, 2019

@mwouts maybe a post in the jupyterlab section of the community forum would find help?

@mwouts
Copy link
Owner Author

mwouts commented Jun 22, 2019

Sure, we could do that. But maybe I'd prefer to gain a bit more experience first, and at least test what is the outcome of installing to share\jupyter\lab\static (if that works, I could publish another release candidate so that we can try that approach on a few different configurations). Also I see that two days ago I had inserted an extra space in @blink1073's id, so he probably did not get any notice for our question yet, sorry...

@blink1073
Copy link

Hi @mwouts! There is currently no way to do what you're seeking, until something like jupyterlab/jupyterlab#2065 is implemented. Extensions can only ship their own package contents. The dependencies are fetched at build time and a single cohesive webpack bundle is created on the user's machine. I opened jupyterlab/jupyterlab#6693 as a prompt to document this better for 1.0.

@mwouts
Copy link
Owner Author

mwouts commented Jun 24, 2019

Thank you so much @blink1073 . That's very clear - and at least now I'm sure not to do anything sub-optimal.

Consequently I will sync the next releases of the jupyterlab extensions with minor releases of the python package (the next one being 1.2.0). The need to rebuild will be less of a surprise to the user.

@mwouts mwouts closed this as completed Jun 24, 2019
mwouts added a commit that referenced this issue Jul 1, 2019
Install the bundled extension rather than the one from npm

#259 #276
mwouts added a commit that referenced this issue Jul 3, 2019
Install the bundled extension rather than the one from npm

#259 #276
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

3 participants