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 compatible for Binder #312

Merged
merged 12 commits into from
Oct 17, 2022
Merged

Make xdem compatible for Binder #312

merged 12 commits into from
Oct 17, 2022

Conversation

adehecq
Copy link
Member

@adehecq adehecq commented Oct 5, 2022

To address #296

This PR:

  • Adds a binder repository
  • In this folder, adds a postbuild file to run command pip install -e . to install xdem
  • install "libgl1-mesa-glx" which is needed, otherwise import cv2 raises error "ImportError: libGL.so.1: cannot open shared object file: No such file or directory"
  • install optional dependencies using extra-environment.yml -> used to install jupytext, for turning .py files into notebooks on the fly.
  • apparently, if binder folder exists, BinderHub does not take into account the environment.yml file in the root directory, so I had to create a symlink to that in the binder folder. Don't know if that's a good idea, or if we should duplicate the file and add a test to check that it is updated at the same time as the main environment.yml.
  • added pip as a dependency, otherwise BinderHub complains (without stopping) during build.

The binder can be tested at https://mybinder.org/v2/gh/adehecq/xdem/binder.

@adehecq
Copy link
Member Author

adehecq commented Oct 5, 2022

Commit 5ab5f06 causes Python version 3.7.12 to be installed. Binder logs say it's because this is required by xdem... 🤔

@rhugonnet
Copy link
Contributor

rhugonnet commented Oct 13, 2022

Looks good!
The mypy error in pre-commit and the pytest errors on RuntimeWarning for divide are now fixed in #304, so your checks should run fine once that PR is merged.

@rhugonnet
Copy link
Contributor

Happy that my routine in test_environment was useful in the end, it detected that pip was added only in environment.yml and not dev-environment.yml! 😛

All tests passing after merging with main, looks ready to merge!

@adehecq adehecq merged commit e878d78 into GlacioHack:main Oct 17, 2022
@adehecq adehecq deleted the binder branch October 17, 2022 14:55
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