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

Update package.json #746

Merged
merged 1 commit into from
Aug 5, 2018
Merged

Update package.json #746

merged 1 commit into from
Aug 5, 2018

Conversation

jan-janssen
Copy link
Contributor

Fix jupyterlab compatibility

Fix jupyterlab compatibility
@jan-janssen
Copy link
Contributor Author

The same is discussed here jupyterlab/jupyterlab#2707

@hainm
Copy link
Collaborator

hainm commented Aug 5, 2018

thanks @jan-janssen. I am not sure why NGL was deleted from requirement.

@hainm hainm merged commit 8eda225 into nglviewer:master Aug 5, 2018
@jan-janssen
Copy link
Contributor Author

If there is any chance to update the requirements on conda-forge/ pip that would be perfect for me.

@hainm
Copy link
Collaborator

hainm commented Aug 5, 2018

what do you mean? ngl is packed with nglview for each release.
https://github.com/arose/nglview/tree/master/nglview/static

@jan-janssen
Copy link
Contributor Author

ok, I did not know that - thanks a lot.

@jan-janssen
Copy link
Contributor Author

But the package at https://www.npmjs.com/package/nglview-js-widgets still contains the old code - can you update the requirements there, to fix the issues with the conda installation?

@hainm
Copy link
Collaborator

hainm commented Aug 6, 2018 via email

@jan-janssen
Copy link
Contributor Author

Basically what I want is to run conda install nglview and that should already configure jupyterlab to work with nglview. For now this requires the following additional steps:

jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
git clone https://github.com/arose/nglview.git ~/nglview
jupyter labextension install ~/nglview/js --no-build
jupyter lab build
rm -rf ~/nglview

https://github.com/pyiron/pyiron-mybinder/blob/master/binder/postBuild

simply because jupyter labextension install nglview-js-widgets does not work. Maybe the easiest way would be to have an additional package named nglviewlab or so, which runs the installation of the widgets after the setup of nglview.

@hainm
Copy link
Collaborator

hainm commented Aug 6, 2018

Basically what I want is to run conda install nglview and that should already configure jupyterlab to work with nglview.

ha, this is new. Does that work because of the new notebook or jupyterlab verison? I recall that I need to perform a bunch of steps to make nglview work with jupyterlab.

simply because jupyter labextension install nglview-js-widgets does not work.

Can you elaborate this?
PS: I have a script to make nglview work with specific lab version. https://github.com/arose/nglview/blob/master/devtools/nglview-jupyterlab.sh

@jan-janssen
Copy link
Contributor Author

I basically spend my weekend on this, but now nglview is working with mybinder.org (what we discussed in #736 ). You can try it with https://github.com/pyiron/pyiron-mybinder and I also build a docker image working with NGLview in Jupyterlab https://github.com/pyiron/pyiron-docker/blob/lab/Dockerfile but at the moment both require the workaround I posted above, so I would like to move this to the post build script of the conda installation, but for this somebody needs to update the nglview-js-widgets package on npm.

@hainm
Copy link
Collaborator

hainm commented Aug 6, 2018

thanks for let us know, but I really need to know why below

simply because jupyter labextension install nglview-js-widgets does not work. Does lab raise error, or nothing is shown up in lab or anything else?

@hainm
Copy link
Collaborator

hainm commented Aug 6, 2018

You can try it with https://github.com/pyiron/pyiron-mybinder

Nice. It would be great if it's easier to find the notebooks.

@jan-janssen
Copy link
Contributor Author

Without the requirement the jupyterlab build fails, webpack is not able to find ngl as dependency of nglview-js-widgets therefore the plugin can not be installed/enabled. As for the binder example - thank you for the feedback - we have to place the notebooks in the root directory, but the same examples are also used in other repositories so it is not so easy (I am working on it). Still it might be also a nice demo for nglview to add an jupyterlab demonstration on mybinder.

@jan-janssen
Copy link
Contributor Author

I added a pull request for the nglview notebooks repository as well arose/nglview-notebooks#2 which includes the jupyterlab config for mybinder.

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

Successfully merging this pull request may close these issues.

2 participants