diff --git a/doc/development/style_guide.md b/doc/development/style_guide.md index cce39922f64..31c4ed72d0f 100644 --- a/doc/development/style_guide.md +++ b/doc/development/style_guide.md @@ -169,7 +169,7 @@ examples. Python API documentation is written in reStructuredText (reST) which is compiled with Sphinx (see -[​PyGRASS documentation](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_index.html)) +[​PyGRASS documentation](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_index.html)) ```python def func(arg1, arg2): @@ -539,7 +539,7 @@ Using temporary maps is preferred over using temporary mapsets. This follows the rule that writing should be done only to the current mapset. Some users may have write permissions only for their mapsets, but not for creating other mapsets. -The following script creates a temporary name using `gs.append_node_pid`` which +The following script creates a temporary name using `gs.append_node_pid` which uses node (computer) name and process identifier to create unique, but identifiable name. The temporary maps are removed when the script ends. @@ -630,7 +630,7 @@ gs.fatal(_("No map found, exiting.")) # debug output (use g.gisenv to enable/disable) # debug level is 1 to 5 (5 is most detailed) -gs.debug(_("Our calculated value is: {}.".format(value), 3) +gs.debug(_("Our calculated value is: {}.").format(value), 3) ``` Do not use the `print` function for informational output. This is reserved for @@ -683,7 +683,7 @@ are only one character. They are defined using: ``` On the command line, the flag is used with dash as `-n`. In Python, the flag -would be used in the _flags_ parameter of `run_command``: +would be used in the _flags_ parameter of `run_command`: ```python gs.run_command(..., flags="n", ...) @@ -736,13 +736,13 @@ Each tool needs to have a description and at least 3 keywords: Notes: - the **first** keyword is the module family which goes to the - [module family index](https://grass.osgeo.org/grass-stable/manuals/general.html) + [module family index](https://grass.osgeo.org/grass-devel/manuals/general.html) in the manual - the **second** keyword is the overall topic which goes to the - [topic index](https://grass.osgeo.org/grass-stable/manuals/topics.html) in the + [topic index](https://grass.osgeo.org/grass-devel/manuals/topics.html) in the manual - the **third** (and more) keyword goes to the - [keyword index](https://grass.osgeo.org/grass-stable/manuals/keywords.html) in + [keyword index](https://grass.osgeo.org/grass-devel/manuals/keywords.html) in the manual These index manual pages are autogenerated during the build process of GRASS @@ -779,6 +779,7 @@ r. - raster commands r3. - raster3D commands v. - vector commands t. - temporal commands +wx. - wxPython GUI commands ``` Some additional naming conventions @@ -847,6 +848,7 @@ else: instead of constructing string from several parts (bad example): ```python +# don't do this if ...: maplabel = 'raster map' else: