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

Make xdem convertible to binder #296

Closed
adehecq opened this issue Sep 2, 2022 · 4 comments · Fixed by #303
Closed

Make xdem convertible to binder #296

adehecq opened this issue Sep 2, 2022 · 4 comments · Fixed by #303
Labels
enhancement Feature improvement or request invalid This doesn't seem right

Comments

@adehecq
Copy link
Member

adehecq commented Sep 2, 2022

It would be great to create a binder from xdem repository directly. To do that, I see two issues:

  1. Once the Binder created, starting a console and running import xdem raises "ModuleNotFoundError: No module named 'xdem'". Something must be changed to xdem's configuration probably
  2. All our examples are python scripts, that are not so nice to work with on Jupyter Lab. If jupytext is added as a dependency, the jupyterlab will be able to open any script as a notebook. With jupytext, it works but the notebooks look quite ugly (see screenshot below), so we need to improve that.

image

To reproduce:

  1. Go https://mybinder.org/ and use URL GlacioHack/xdem to start the Binder.
  2. Install jupytext with conda install -c conda-forge jupytext, then start jupyter notebook and open any of xdem's example scripts
@adehecq adehecq added enhancement Feature improvement or request invalid This doesn't seem right labels Sep 2, 2022
@fmaussion
Copy link

Where is your binder configuration? Usually it would be in a binder folder at the repo root level

@adehecq
Copy link
Member Author

adehecq commented Sep 2, 2022

We don't have one 🙃 I thought all that was needed was the setup.py.
I don't find any in OGGM. Do you have an example of a configuration somewhere? Because I tested running mybinder with OGGM/oggm and import oggm works...

@fmaussion
Copy link

Because I tested running mybinder with OGGM/oggm and import oggm works...

No kidding... Times have changed!

OK so OGGM uses quite a few shenanigans to share the same environment across many different binder links, which I don't recommend here. for other reps we usually have a binder folder like here: https://github.com/OGGM/glacier_simulator/tree/master/binder

@adehecq
Copy link
Member Author

adehecq commented Oct 5, 2022

Adding the binder folder helps creating a new environment, but somehow opencv does not install correctly. I get the same error as here. I'll try the same fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature improvement or request invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants