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

Jupyter: Non-interactive display #1668

Merged
merged 22 commits into from
Jul 2, 2021

Conversation

chaedri
Copy link
Contributor

@chaedri chaedri commented Jun 21, 2021

This is a set of functions to display non-interactive maps in Jupyter Notebooks, as proposed in the Google Summer of Code project, Improved Integration of GRASS and Jupyter Notebooks. The goal of these functions is to make the display of GRASS maps more intuitive in Jupyter Notebooks. You can test the functionality by launching the repository in Binder here:

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

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.

This looks good! The difference to the example_notebook.ipynb is huge, but we need resolve couple of things before this is a full replacement. Please, specify in the PR description what you now see as a goal for this PR (you can change that any time later as we discuss things further).

python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
doc/notebooks/jupyter_integration.ipynb Outdated Show resolved Hide resolved
doc/notebooks/jupyter_integration.ipynb Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
doc/notebooks/jupyter_integration.ipynb Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.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.

Here is couple more things about handling of the rendering environment. Basically, it's: see GrassRenderer here:

https://github.com/ncsu-geoforall-lab/gis714-2021-tangible-landscape/blob/main/website/render_activities.py#L41

binder/requirements.txt Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
@wenzeslaus wenzeslaus added this to In progress in Integration with Jupyter Notebooks via automation Jun 27, 2021
@wenzeslaus wenzeslaus added enhancement New feature or request gsoc Reserved for Google Summer of Code student(s) labels Jun 27, 2021
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.py Outdated Show resolved Hide resolved
python/grass/jupyter/display.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.

This looks great and it is ready to be tested!

@wenzeslaus wenzeslaus marked this pull request as ready for review June 30, 2021 03:33
@wenzeslaus wenzeslaus changed the title Non-interactive display Jupyter: Non-interactive display Jul 2, 2021
@wenzeslaus wenzeslaus merged commit 86acc1c into OSGeo:master Jul 2, 2021
Integration with Jupyter Notebooks automation moved this from In progress to Done Jul 2, 2021
@chaedri chaedri deleted the non-interactive-display branch July 6, 2021 20:00
@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
* Non-interactive display functions with rendering based on d-commands.
* Rendering encapsulated in a class. Each object holds unique settings.
* Examples in notebook are now showing this new API.
* Deleted display_settings function.
* Rendering class init accepts env parameter as all well-behaved functions in grass.script.
* grass.script is used as a backend for running commands.
* Rendering run method provides general way of rendering with any d-command (which is not monitor-focused).
* Errors reported as exceptions, e.g., ValueError.
* Added pathlib Path object supported for filenames.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
* Non-interactive display functions with rendering based on d-commands.
* Rendering encapsulated in a class. Each object holds unique settings.
* Examples in notebook are now showing this new API.
* Deleted display_settings function.
* Rendering class init accepts env parameter as all well-behaved functions in grass.script.
* grass.script is used as a backend for running commands.
* Rendering run method provides general way of rendering with any d-command (which is not monitor-focused).
* Errors reported as exceptions, e.g., ValueError.
* Added pathlib Path object supported for filenames.
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