Skip to content

doc: Migrate notebooks to grass.tools API - #7360

Merged
wenzeslaus merged 7 commits into
OSGeo:mainfrom
wenzeslaus:update-notebooks-to-grass.tools
May 8, 2026
Merged

wenzeslaus merged 7 commits into
OSGeo:mainfrom
wenzeslaus:update-notebooks-to-grass.tools

Conversation

@wenzeslaus

@wenzeslaus wenzeslaus commented May 2, 2026 •

Copy link
Copy Markdown
Member

Replace grass.script command functions (gs.run_command, gs.parse_command, gs.read_command, gs.write_command, gs.mapcalc, gs.list_strings) with grass.tools.Tools across the doc/ notebooks.

The migration of parallelization_tutorial.ipynb is partial.

Also fixes the SeriesMap example in jupyter_tutorial.ipynb so it works with the nc_basic_spm_grass7 dataset, where "lakes" is a raster, not a vector: replace "lakes" with "roadsmajor".

https://mybinder.org/v2/gh/wenzeslaus/grass/update-notebooks-to-grass.tools?urlpath=lab%2Ftree%2Fdoc%2Fexamples%2Fnotebooks%2Fjupyter_example.ipynb

Replace grass.script command functions (gs.run_command, gs.parse_command, gs.read_command, gs.write_command, gs.mapcalc, gs.list_strings) with grass.tools.Tools across the doc/ notebooks.

The migration of parallelization_tutorial.ipynb is partial.

Also fixes the SeriesMap example in jupyter_tutorial.ipynb so it works with the nc_basic_spm_grass7 dataset, where "lakes" is a raster, not a vector: replace "lakes" with "roadsmajor".
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
wenzeslaus and others added 2 commits May 6, 2026 00:20
Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
Comment thread doc/examples/notebooks/hydrology.ipynb Resolved
wenzeslaus and others added 2 commits May 6, 2026 00:27
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@wenzeslaus

Copy link
Copy Markdown
Member Author

All notebooks run in Binder except the parallelization one which is missing both tooling (parallel) and data (different project expected).

@wenzeslaus
wenzeslaus enabled auto-merge (squash) May 7, 2026 01:06
@wenzeslaus
wenzeslaus merged commit c90c9a4 into OSGeo:main May 8, 2026
25 checks passed
@wenzeslaus
wenzeslaus deleted the update-notebooks-to-grass.tools branch May 8, 2026 01:55
@github-actions github-actions Bot added this to the 8.6.0 milestone May 8, 2026
wenzeslaus added a commit that referenced this pull request May 8, 2026
Replace grass.script command functions (gs.run_command, gs.parse_command, gs.read_command, gs.write_command, gs.mapcalc, gs.list_strings) with grass.tools.Tools across the doc/ notebooks.

The migration of parallelization_tutorial.ipynb is partial and the tutorial is actually (already) broken in Binder (info there is still valid, so it is a fully usable tutorial).

Also fixes the SeriesMap example in jupyter_tutorial.ipynb so it works with the nc_basic_spm_grass7 dataset, where "lakes" is a raster, not a vector: replace "lakes" with "roadsmajor".

Set, but don't always read computational region. Use JSON to get zones (much simpler). Updates intros.

---------

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
Replace grass.script command functions (gs.run_command, gs.parse_command, gs.read_command, gs.write_command, gs.mapcalc, gs.list_strings) with grass.tools.Tools across the doc/ notebooks.

The migration of parallelization_tutorial.ipynb is partial and the tutorial is actually (already) broken in Binder (info there is still valid, so it is a fully usable tutorial).

Also fixes the SeriesMap example in jupyter_tutorial.ipynb so it works with the nc_basic_spm_grass7 dataset, where "lakes" is a raster, not a vector: replace "lakes" with "roadsmajor".

Set, but don't always read computational region. Use JSON to get zones (much simpler). Updates intros.

---------

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants