Skip to content

Add settings for Binder #2659

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

Closed
wants to merge 2 commits into from

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Jan 5, 2020

Sadly, this doesn't work yet.

There is an error when running ./dev-install.sh on Binder:

ValueError:                                                                                                           
"@jupyter-widgets/[email protected]" is not compatible with the current JupyterLab                             
Conflicting Dependencies:                                                                                             
JupyterLab                        Extension      Package                                                              
>=1.2.1 <1.3.0                    >=2.0.0-beta.1 <3.0.0@jupyterlab/application                                        
>=1.2.2 <1.3.0                    >=2.0.0-beta.1 <3.0.0@jupyterlab/notebook                                           
>=1.2.1 <1.3.0                    >=2.0.0-beta.1 <3.0.0@jupyterlab/rendermime                                         
>=1.5.0 <1.6.0                    >=2.0.0-beta.1 <3.0.0@jupyterlab/rendermime-interfaces                              
>=4.2.0 <4.3.0                    >=5.0.0-beta.1 <6.0.0@jupyterlab/services                                           

Apparently, the JupyterLab and jupyter-widgets/jupyterlab-manager versions have to match (see https://github.com/jupyter-widgets/ipywidgets/blob/master/packages/jupyterlab-manager/README.md), but I don't know how to handle this in a development installation ...

Any ideas?

See #2301.

@mgeier mgeier mentioned this pull request Jan 5, 2020
@pbugnion
Copy link
Member

pbugnion commented Jan 7, 2020

Hmm... As far as I can tell, the classic notebook binder link works -- see my comment on issue #2301.

The JupyterLab instance that is created doesn't support widgets, though. I've opened a new issue to address this here. I think your PR could be adapted fairly easily to support this.


set -e

./dev-install.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the Binder is user facing, how about using a released version of ipywidgets instead?

This would mean adding ipywidgets=7.5 to environment.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can create a Binder image for any given commit in the repo. I would expect each of those to have the appropriate version of ipywidgets and jupyter-widgets/jupyterlab-manager installed.

If all goes well (and I'm currently not sure that it will), I would like to do the same thing for the docs on RTD, which would mean that the latest docs are actually using the master version of the software.

And then, we could create Binder links on the RTD pages which link from a specific version of the docs to the exact same version running on Binder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, for this use case then it makes sense to do a dev install.

@jtpio
Copy link
Member

jtpio commented Jan 8, 2020

For JupyterLab, specifying jupyterlab=1 in environment.yml should do the trick.

@mgeier
Copy link
Contributor Author

mgeier commented Jan 8, 2020

Thanks @jtpio!

Now the above-mentioned error doesn't appear anymore, but the Binder build is hanging at some point.

This is the link I tried:
https://mybinder.org/v2/gh/mgeier/ipywidgets/binder-environment

I've kept the page open for more than an hour now and it's still not finished.

Any ideas what the problem could be?

@mgeier
Copy link
Contributor Author

mgeier commented Jan 8, 2020

UPDATE: I've just started the Binder build again (and again), and after a few minutes it now gives me the original error.

@pbugnion
Copy link
Member

pbugnion commented Jan 8, 2020

Thanks for working on this!

I agree with @jtpio . I don't think we should do a dev-install for the public facing Binder link for ipywidgets.

I think the right way to make progress on improving Binder support is to include the JupyterLab manager and aim to close #2676.

@mgeier
Copy link
Contributor Author

mgeier commented Jan 9, 2020

I agree with @jtpio . I don't think we should do a dev-install for the public facing Binder link for ipywidgets.

But it looks like @jtpio changed his mind, see #2659 (comment).

I think the right way to make progress on improving Binder support is to include the JupyterLab manager and aim to close #2676.

Sure. The question is only: which version of the JupyterLab manager?

I'm arguing that it should be the version corresponding to whatever commit is used in Binder.

What if you want to try out a new feature (probably from some feature branch, probably even from a fork) in Binder?
This won't work if the jupyter-widgets/jupyterlab-manager used by Binder is outdated (w.r.t the commit containing the new feature).

@jtpio
Copy link
Member

jtpio commented Jan 9, 2020

Sorry @mgeier for the confusion. My comment was directed to the particular use case of being able to pin a Binder to a specific commit.

@jtpio
Copy link
Member

jtpio commented Jan 9, 2020

By the way, is this PR still needed or replaced by #2701?

@mgeier
Copy link
Contributor Author

mgeier commented Jan 9, 2020

Well I would prefer #2701, but if you prefer using conda, I could try to get this PR working as well.

But as soon as #2701 is merged, this PR becomes obsolete.

@ianhi ianhi closed this in #2701 Mar 12, 2021
@mgeier mgeier deleted the binder-environment branch March 13, 2021 09:12
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.

3 participants