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

Binder button #1628

Merged
merged 18 commits into from
Jun 15, 2021
Merged

Binder button #1628

merged 18 commits into from
Jun 15, 2021

Conversation

chaedri
Copy link
Contributor

@chaedri chaedri commented Jun 9, 2021

This pull request is for the binder/Jupyter Notebook button discussed in #1603.

I wasn't quite sure where in the repository to put the button so I added it to the readme. Comments, discussion or a better location welcome.

The intention of having a binder and Jupyter Notebook is eventually demonstrate how to use GRASS and some of the Jupyter-specific functions. As part of the Google Summer of Code project "Improved Integration of Jupyter and GRASS (https://trac.osgeo.org/grass/wiki/GSoC/2021/JupyterAndGRASS), I plan to improve the launch of GRASS in Jupyter and the display functions.

README.md Outdated Show resolved Hide resolved
@neteler neteler requested a review from veroandreo June 9, 2021 20:12
@veroandreo
Copy link
Contributor

I checked the link and got this:

image

I assume it will then have some content, right? Like real examples to use PyGRASS as it is stated in the text. Also why only pygrass? or why specifically pygrass? Just curious.

@wenzeslaus
Copy link
Member

I wasn't quite sure where in the repository to put the button so I added it to the readme.

Definitively the readme file. I think that's expected. I'm not sure where in the readme. Putting the button/badge to other badges would keep the readme short. If someone knows what they are looking for, they will find it there. On the other hand, a separate section with some description might be better for people not familiar with Binder or not expecting it, but I don't know how big that group of people is - these people are looking on a readme at GitHub. Another advantage of a section is that we may want to add more than one button because we may want to have more than one example notebook.

@wenzeslaus
Copy link
Member

I assume it will then have some content, right?

I would keep this PR just for the button/badge itself, but any suggestion on the content/purpose/focus? We can discuss on the mailing list if you this that would be helpful.

Also why only pygrass?

Speaking for @chaedri here, but I don't think that's what she meant. As far as I recall, PyGRASS was meant to be Pythonic interface to GRASS modules and C libraries. However, most people take it to mean Python interface to GRASS since that's how it is for many libraries, thus using it for the whole Python API, not just grass.pygrass.

The more unfortunate part is that the most unique part of PyGRASS, the interface to C libraries, does not work in Jupyter Notebooks without a substantial setup procedure because the dynamic libraries are not installed on path.

@wenzeslaus wenzeslaus added this to In progress in Integration with Jupyter Notebooks via automation Jun 10, 2021
@wenzeslaus wenzeslaus added enhancement New feature or request gsoc Reserved for Google Summer of Code student(s) labels Jun 10, 2021
README.md 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.

@veroandreo
Copy link
Contributor

I assume it will then have some content, right?

I would keep this PR just for the button/badge itself, but any suggestion on the content/purpose/focus? We can discuss on the mailing list if you this that would be helpful.

Well, since the text in the README reads "Launch this repository in binder and experiment with GRASS's Python API in Jupyter Notebooks by clicking the button below" I would expect some ready to use examples to experiment, minimal explanation, links to documentation or so. What should I type in that code cell so as to get started? I have no clue :)

I might be missing something and I apologize in advance if that's the case, but I think of someone (me) landing in the README and finding this badge with a link to try GRASS in a Jupyter notebook (cool!) but then finding a completely blank notebook... what to test? how to experiment?

@wenzeslaus
Copy link
Member

I assume it will then have some content, right?

I would keep this PR just for the button/badge itself, but any suggestion on the content/purpose/focus? We can discuss on the mailing list if you this that would be helpful.

Well, since the text in the README reads "Launch this repository in binder and experiment with GRASS's Python API in Jupyter Notebooks by clicking the button below"

Actually, we are not limited to Python. If you use, e.g., the Launcher in JupyterLab, you can get to terminal and get GRASS shell or run grass ... --exec. So, the question is perhaps what we want to highlight for people who get to GRASS through GitHub.

I would expect some ready to use examples to experiment, minimal explanation, links to documentation or so. What should I type in that code cell so as to get started? I have no clue :)

Maybe the Try GRASS GIS in Jupyter Notebook or its first cell is a good starting point for what we want there.

@chaedri I think you can copy-paste the basic try notebook. I guess it is needed for this PR to make sense since it relates to where the link points to and what should be written in the readme. I think it is better to have it not computed in the source code and it is still okay for the users.

Then, in #1629, you can add another notebook with the better Jupyter interface which you will update as you go. This way, anybody would be able to easily compare the current and future interface.

BTW, I don't think this should replace the "try online" notebooks in the website, but we can discuss that.

I might be missing something and I apologize in advance if that's the case, but I think of someone (me) landing in the README and finding this badge with a link to try GRASS in a Jupyter notebook (cool!) but then finding a completely blank notebook... what to test? how to experiment?

No, no, you are right. I think by default you should get something other than an empty page. It's just I don't know what that something is. Well, as I said above, we have some code to copy-paste there now, but I just want to emphasize that this is (wide) open to suggestions.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
doc/notebooks/example_notebook.ipynb Outdated Show resolved Hide resolved
doc/notebooks/example_notebook.ipynb Outdated Show resolved Hide resolved
@wenzeslaus
Copy link
Member

wenzeslaus commented Jun 12, 2021

Link to this PR's Binder (to test the notebook, not just the badge/button):

Jypyter Notebook only (aka classic notebook interface):
https://mybinder.org/v2/gh/chaedri/grass/binder-button?filepath=doc%2Fnotebooks%2Fexample_notebook.ipynb

JupterLab:
https://mybinder.org/v2/gh/chaedri/grass/binder-button?urlpath=lab%2Ftree%2Fdoc%2Fnotebooks%2Fexample_notebook.ipynb

chaedri and others added 3 commits June 13, 2021 08:58
@chaedri chaedri marked this pull request as ready for review June 13, 2021 15:33
@chaedri
Copy link
Contributor Author

chaedri commented Jun 13, 2021

I think I've addressed all the comments now. Once merged, the button will launch the example_notebook.ipynb. You can test the notebook with the link posted by @wenzeslaus in this comment. Feedback welcome!

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.

Works for me in Binder. Very easy to try.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@veroandreo veroandreo left a comment

Choose a reason for hiding this comment

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

I suggested minor language fixes only

doc/notebooks/example_notebook.ipynb Outdated Show resolved Hide resolved
doc/notebooks/example_notebook.ipynb Outdated Show resolved Hide resolved
chaedri and others added 3 commits June 14, 2021 10:16
Co-authored-by: Veronica Andreo <veroandreo@gmail.com>
Co-authored-by: Veronica Andreo <veroandreo@gmail.com>
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.

What about leaving out the heading?

README.md Outdated Show resolved Hide resolved
@wenzeslaus wenzeslaus merged commit e94771d into OSGeo:master Jun 15, 2021
Integration with Jupyter Notebooks automation moved this from In progress to Done Jun 15, 2021
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 15, 2021
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
@chaedri chaedri deleted the binder-button branch June 16, 2021 14:54
@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
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
a0x8o added a commit to a0x8o/grass that referenced this pull request May 9, 2024
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
a0x8o added a commit to a0x8o/grass that referenced this pull request May 21, 2024
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 3, 2024
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 27, 2024
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
* Adds Binder badge/button to the readme file.
* Adds a separate "call to action" paragraph to highlight Binder rather than putting it among other badges.
* Uses JupyterLab.
* Adds content to the basic example, so it is clear how to start using the standard grass.script API.
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

5 participants