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

Added Binder setup files #1603

Merged
merged 11 commits into from
Jun 10, 2021
Merged

Added Binder setup files #1603

merged 11 commits into from
Jun 10, 2021

Conversation

chaedri
Copy link
Contributor

@chaedri chaedri commented May 30, 2021

I'm just opening this pull request draft to get the ball rolling for my Google Summer of Code project. As part of the GRASS and Jupyter Notebook project, we discussed adding setup files to run binder.

binder/postBuild Outdated Show resolved Hide resolved
Copy link
Member

@ninsbl ninsbl left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Probably best to include download of sample data into the notebook if needed...
Then the commented code at the bottom of the postBuild script could be removed...

Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

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

Thank you. I think this will be very helpful.

binder/postBuild Outdated Show resolved Hide resolved
binder/postBuild Outdated Show resolved Hide resolved
binder/requirements.txt Show resolved Hide resolved
@wenzeslaus wenzeslaus added the gsoc Reserved for Google Summer of Code student(s) label May 31, 2021
@wenzeslaus
Copy link
Member

Probably best to include download of sample data into the notebook if needed...
Then the commented code at the bottom of the postBuild script could be removed...

Or download the data always? We don't know how this will be used, so maybe the download on demand in the notebook is best now. Definitively remove the comment.

@wenzeslaus
Copy link
Member

This is for a separate PR, but I think a GitHub Action should generate a Binder button aka Binder badge (which is just a URL and an image) and post it as a comment to each new PR so that you don't have to guess or construct the Binder URL yourself. That's my idea how this should be eventually used. The URL can also point to a specific notebook so you don't need to go through the directory structure to find it. The button/badge for this PR with notebooks and JupyterLab instead of a plain notebook:

Binder

 _____________________________
| Boootton. How cool is that? |
 -----------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
_\|/__\|/__\|/_ ||     ||  _\|/__\|/_

Suggestions about the content of the notebook are welcome (there can be also more than one), but that's also for another PR. Empty one is fine with me now as well as skipping the dataset download.

@ninsbl
Copy link
Member

ninsbl commented May 31, 2021

Or download the data always? We don't know how this will be used, so maybe the download on demand in the notebook is best now. Definitively remove the comment.

Yes, I think both ways of handling that would be good. My thought was to have a blank setup and add (sample) data - including location / mapset setup - in the respective example notebook... As allways there are pros and cons and I am fine with either solution...

@ninsbl
Copy link
Member

ninsbl commented May 31, 2021

This is for a separate PR, but I think a GitHub Action should generate a Binder button aka Binder badge (which is just a URL and an image) and post it as a comment to each new PR so that you don't have to guess or construct the Binder URL yourself.

Sounds like a very good idea.

binder/postBuild Outdated Show resolved Hide resolved
@ninsbl
Copy link
Member

ninsbl commented May 31, 2021

This is for a separate PR, but I think a GitHub Action should generate a Binder button aka Binder badge

So something like along this line I guess:
https://github.com/jupyterhub/repo2docker-action#use-github-actions-to-cache-the-build-for-binderhub

Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

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

I think we can merge after you accept and test the changes.

BTW, perhaps obvious, but I used the button/link to test this and come up with the suggestion.

binder/postBuild Outdated Show resolved Hide resolved
binder/postBuild Outdated Show resolved Hide resolved
Co-authored-by: Vaclav Petras <wenzeslaus@gmail.com>
Copy link
Member

@ninsbl ninsbl left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@chaedri chaedri marked this pull request as ready for review June 9, 2021 15:41
@chaedri chaedri mentioned this pull request Jun 9, 2021
@wenzeslaus wenzeslaus added this to In progress in Integration with Jupyter Notebooks via automation Jun 10, 2021
@wenzeslaus wenzeslaus added the enhancement New feature or request label Jun 10, 2021
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

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

The grass (or !grass) command runs in Binder which is what I saw as the goal for this PR.

@wenzeslaus wenzeslaus merged commit 019f18d into OSGeo:master Jun 10, 2021
Integration with Jupyter Notebooks automation moved this from In progress to Done Jun 10, 2021
@wenzeslaus
Copy link
Member

Awesome! Now all PRs can be tested in Binder. One just needs to figure out the URL either by filling out the form at https://mybinder.org or by filling out this template:

https://mybinder.org/v2/gh/<PR author name>/grass/<branch name>

a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 10, 2021
* Setup files for Binder tested with mybinder.org.
* Sample data downloaded during the image build on Binder.
* Empty notebook included as a placeholder.
* JupyterLab used on Binder.
* Using standard system setup of GRASS, so grass command works, but anything else needs to be set up.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 10, 2021
* Setup files for Binder tested with mybinder.org.
* Sample data downloaded during the image build on Binder.
* Empty notebook included as a placeholder.
* JupyterLab used on Binder.
* Using standard system setup of GRASS, so grass command works, but anything else needs to be set up.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 10, 2021
* develop:
  Add Binder setup files (OSGeo#1603)
@chaedri chaedri deleted the binder branch June 13, 2021 12:55
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
* Setup files for Binder tested with mybinder.org.
* Sample data downloaded during the image build on Binder.
* Empty notebook included as a placeholder.
* JupyterLab used on Binder.
* Using standard system setup of GRASS, so grass command works, but anything else needs to be set up.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
* Setup files for Binder tested with mybinder.org.
* Sample data downloaded during the image build on Binder.
* Empty notebook included as a placeholder.
* JupyterLab used on Binder.
* Using standard system setup of GRASS, so grass command works, but anything else needs to be set up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gsoc Reserved for Google Summer of Code student(s)
Development

Successfully merging this pull request may close these issues.

None yet

4 participants