Skip to content

Commit

Permalink
Document that GRASS jupyter enables overwrite by default (#3516)
Browse files Browse the repository at this point in the history
* Document that GRASS jupyter enables overwrite by default

* Update python/grass/jupyter/__init__.py

Explain rationale for defaulting to overwrite

Co-authored-by: Vaclav Petras <[email protected]>

Improve syntax

Co-authored-by: Vaclav Petras <[email protected]>

* Shorten line length of lines commited directly from GH

---------

Co-authored-by: Vaclav Petras <[email protected]>
  • Loading branch information
marisn and wenzeslaus authored Mar 27, 2024
1 parent 2869b8a commit 17dac19
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/grass/jupyter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@
>>> gj.init("grassdata/nc_basic_spm_grass7/user1")
.. note::
Contrary to typical command line / GUI module usage, grass.jupyter
enables output overwrite by default to align with behaviour of other
Python packages and to allow repeated executions of the same cells and
of the whole notebook. The default command line behaviour can be
restored by setting GRASS_OVERWRITE environmental variable to "0" after
`gj.init()` call: `os.environ["GRASS_OVERWRITE"] = "0"`.
All classes and functions for interaction in notebooks are now available under *gj*,
for example we can display a map with a selected raster and vector::
Expand Down

0 comments on commit 17dac19

Please sign in to comment.