Skip to main content
This guide demonstrates how to determine docs coverage and create documentation for your codebase. This primarily leverages two APIs:

Determining Documentation Coverage

In order to determine the extent of your documentation coverage, you can iterate through all symbols of interest and count the number of docstrings: To see your current documentation coverage, you can iterate through all symbols of interest and count the number of docstrings:
python
Which provides the following output:

Identifying Areas of Low Documentation Coverage

To identify areas of low documentation coverage, you can iterate through all directories and count the number of functions with docstrings.
Learn more about Directories here.
python
Which provides the following output:

Leveraging AI for Generating Documentation

For non-trivial codebases, it can be challenging to achieve full documentation coverage. The most efficient way to edit informative docstrings is to use codebase.ai to generate docstrings, then use the set_docstring method to update the docstring.
Learn more about using AI in our guides.
python

Adding Explicit Parameter Names and Types

Alternatively, you can also rely on deterministic string formatting to edit docstrings. To add β€œGoogle-style” parameter names and types to a function docstring, you can use the following code snippet:
python