Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed May 8, 2024
1 parent 310144b commit a709da7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions doc/development/style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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", ...)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -779,6 +779,7 @@ r. - raster commands
r3. - raster3D commands
v. - vector commands
t. - temporal commands
wx. - wxPython GUI commands
```

Some additional naming conventions
Expand Down Expand Up @@ -847,6 +848,7 @@ else:
instead of constructing string from several parts (bad example):

```python
# don't do this
if ...:
maplabel = 'raster map'
else:
Expand Down

0 comments on commit a709da7

Please sign in to comment.