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

Session initiations functions for Jupyter Notebooks #1629

Merged
merged 37 commits into from
Jun 17, 2021

Conversation

chaedri
Copy link
Contributor

@chaedri chaedri commented Jun 9, 2021

This PR contains several functions that simplify and shorten the launch of GRASS in Jupyter Notebooks, written as part of my Google Summer of Code project (https://trac.osgeo.org/grass/wiki/GSoC/2021/JupyterAndGRASS). It also contains a Jupyter Notebook (which launches in Binder) to demonstrate usage of the functions.

@wenzeslaus wenzeslaus changed the title GRASS-session initiations functions for Jupyter Notebooks Session initiations functions for Jupyter Notebooks Jun 9, 2021
@landam landam added the gsoc Reserved for Google Summer of Code student(s) label Jun 9, 2021
@wenzeslaus wenzeslaus added this to In progress in Integration with Jupyter Notebooks via automation 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.

Thanks for submitting this. I think it will be good to get this to a working state even with some prototype API and merge it (based on the timing, we may need to consider how it will fit into 8.0 release - currently, the things merged to master will become part of 8.0 release).

Anyway, this will change massively, but having something working in the code may be helpful for testing and developing ideas, so that's what I think should be the aim in this PR.

python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init-funcs.py Outdated Show resolved Hide resolved
@wenzeslaus wenzeslaus added enhancement New feature or request needs rebase Rebase to or merge with the latest base branch is needed labels Jun 10, 2021
@wenzeslaus wenzeslaus mentioned this pull request Jun 10, 2021
python/grass/jupyter/__init__.py Outdated Show resolved Hide resolved
python/grass/jupyter/init_funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/init_funcs.py Outdated Show resolved Hide resolved
python/grass/jupyter/__init__.py Outdated Show resolved Hide resolved
doc/notebooks/example_notebook.ipynb Outdated Show resolved Hide resolved
doc/notebooks/GSoC2021_GRASS_Jupyter_Integration.ipynb Outdated Show resolved Hide resolved
doc/notebooks/GSoC2021_GRASS_Jupyter_Integration.ipynb Outdated Show resolved Hide resolved
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.

Poor doc/notebooks/example_notebook.ipynb, by deleting the file, you are asking for it to be deleted in the main code. Practically, this will cause a merge conflict with the PR where you are modifying it.

.gitignore Outdated Show resolved Hide resolved
@wenzeslaus
Copy link
Member

I think the data is in /home/data/grassdata/ not /home/grassdata/, so it does not work in Binder.

access: No such file or directory
ERROR: LOCATION </home/grassdata/nc_basic_spm_grass7> not available

We can revisit the question of where the data should be, but that's for another PR.

Let's keep the policy of un-computed notebooks in the source code. We can also revisit this later.

Try-in-Binder link:

https://mybinder.org/v2/gh/chaedri/grass/init-funcs?urlpath=lab%2Ftree%2Fdoc%2Fnotebooks%2Fjupyter_integration.ipynb

doc/notebooks/jupyter_integration.ipynb Outdated Show resolved Hide resolved
doc/notebooks/jupyter_integration.ipynb Outdated Show resolved Hide resolved
python/grass/jupyter/__init__.py Outdated Show resolved Hide resolved
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 quotes are consistent, +1, but it is the other kind. Then, I think we are done.

@chaedri
Copy link
Contributor Author

chaedri commented Jun 16, 2021

Oops - I'm reading your comments above correctly now. They are double quotes now.

doc/notebooks/jupyter_integration.ipynb Outdated Show resolved Hide resolved
doc/notebooks/jupyter_integration.ipynb Outdated Show resolved Hide resolved
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.

Great. Works great for me with the Binder link. The CI fail is unrelated.

@wenzeslaus wenzeslaus merged commit d1a8a69 into OSGeo:master Jun 17, 2021
Integration with Jupyter Notebooks automation moved this from In progress to Done Jun 17, 2021
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2021
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 18, 2021
* develop:
  Add session initiations functions for Jupyter Notebooks (OSGeo#1629)
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jun 19, 2021
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
@chaedri chaedri deleted the init-funcs branch June 20, 2021 22:13
@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
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request May 9, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request May 21, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 3, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 27, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 10, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 31, 2024
* Create subpackage grass.jupyter.
* Add examples as an additional notebook.
* The API is experimental.
* The init function starts a session, but there is no way of ending it.
* The display function reflects the current practice in notebooks. It will be reworked during GSoC 2021.
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