Skip to content

Commit

Permalink
docs: move Programmer's manual creation to INSTALL.md (OSGeo#4336)
Browse files Browse the repository at this point in the history
- move Programmer's manual creation from `doc/development/README.md` to `INSTALL.md`.

update `doc/development/README.md`
- add Python API; add subsections
- update URLs and wording
- list guides

- remove stray control chars (visible in vim) in `doc/development/style_guide.md`
  • Loading branch information
neteler authored Sep 19, 2024
1 parent d5bb442 commit 89cfc52
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 42 deletions.
32 changes: 29 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,35 @@ developers mailing list. See <https://grass.osgeo.org/development/>

## (L) GRASS PROGRAMMER'S MANUAL

The Programmer's manual is generated with doxygen from the source code.
Please see the [README](doc/development/README.md) file and the files at:
<https://grass.osgeo.org/programming8/>
The Programmer's manual <https://grass.osgeo.org/programming8/> is
generated from the source code. This requires the installation of
`doxygen` (<http://www.doxygen.nl>) and optionally Graphviz `dot`
(<https://graphviz.org/doc/info/command.html>).

The main file is: `./grasslib.dox` where all sub-documents have
to be linked to.

To locally generate the 'Programmer's Manual', run

```sh
make htmldocs
```

To generate documentation as a single html file
(recommended for simple reading)

```sh
make htmldocs-single
```

This process takes some time. The result will be found in
the file `lib/html/index.html`.

To generate the 'Programmer's Manual' in PDF format, run

```sh
make pdfdocs
```

## (M) CONTRIBUTING CODE AND PATCHES

Expand Down
46 changes: 11 additions & 35 deletions doc/development/README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,19 @@
# Development and Maintenance Documentation

Here is development and maitanance documentation. The API documentation
is at appropriate places, but here is the information relevant to
contributing to GRASS GIS and its maintanance.
Find below the development and maintenance documentation.
The API documentation is available in the appropriate places,
but here is the information relevant to contributing to and
maintaining GRASS GIS.

## How to generate the 'Programmer's Manual'
## Style and GitHub guide

You can locally generate the [GRASS GIS Programmer's Manual](https://grass.osgeo.org/programming8/).
- [GRASS Programming Style Guide](style_guide.md)
- [Guide to contributing on GitHub](github_guide.md)

This needs doxygen (<http://www.doxygen.org>) and optionally
Graphviz dot (<http://www.research.att.com/sw/tools/graphviz/>).
## Python API

To build the GRASS programmer's documentation, run
- ["grass" Python package documentation](https://grass.osgeo.org/grass-devel/manuals/libpython/)

```sh
make htmldocs
```
## C API

Or to generate documentation as a single html file
(recommended for simple reading)

```sh
make htmldocs-single
```

This takes quite some time. The result is in `lib/html/index.html`
which refers to further document repositories in

```text
lib/vector/html/index.html
lib/db/html/index.html
lib/gis/html/index.html
```

The master file is: `./grasslib.dox` where all sub-documents have to
be linked to.

To generate the documents in PDF format, run

```sh
make pdfdocs
```
- [GRASS Programmer's manual](https://grass.osgeo.org/programming8/)
8 changes: 4 additions & 4 deletions doc/development/style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ sorted and separated by a newline.

Use function names which fulfill the official [GNU naming
convention](https://www.gnu.org/prep/standards/html_node/Names.html). Instead of
naming a function like: MyNewFunction() use snake case: my_new_function()`.
naming a function like: `MyNewFunction()` use snake case: `my_new_function()`.

### Using pre-commit

Expand Down Expand Up @@ -192,7 +192,7 @@ There are three types of documentation: C API, Python API and tool documentation
#### C API documentation

We
[use doxygen and document the functions](https://grass.osgeo.org/programming8/)
[use doxygen and document the functions](https://grass.osgeo.org/programming8/)
directly in the source code. See `lib/gis/open.c` and `lib/gis/gislib.dox` for
examples.

Expand Down Expand Up @@ -947,7 +947,7 @@ gs.message(_("Running through {}").format(shellname))
### Developing C tools

Refer to the [online GRASS Programmer's
Manual](https://grass.osgeo.org/programming8/) or generate it with `make
Manual](https://grass.osgeo.org/programming8/) or generate it with `make
htmldocs` or `make pdfdocs`.

#### Use GRASS library functions
Expand All @@ -962,7 +962,7 @@ improves portability.
- File seek: `G_fseek()`, `G_ftell()`
- Printing: `G_asprintf()`, `G_vsaprintf()`, `G_vfaprintf()`, ...

Please refer to [the programmers manual](https://grass.osgeo.org/programming8/)
Please refer to the [programmers manual](https://grass.osgeo.org/programming8/)
for the proper use (e.g., determining if any casts are needed for arguments or
return values) of these library functions. They may perform a task slightly
different from their corresponding C library function, and thus, their use may
Expand Down

0 comments on commit 89cfc52

Please sign in to comment.