2024-03-06 21:52:11 +02:00
## Overview
2023-12-24 13:08:13 +02:00
The `add_docs` tool scans the PR code changes, and automatically suggests documentation for any code components that changed in the PR (functions, classes, etc.).
2023-10-01 19:51:15 +03:00
It can be invoked manually by commenting on any PR:
```
/add_docs
```
2024-04-18 10:04:38 +03:00
## Example usage
Invoke the tool manually by commenting `/add_docs` on any PR:
2023-10-02 10:11:28 +03:00
2024-03-26 23:00:57 +02:00
{width=768}
2024-03-06 21:52:11 +02:00
2024-04-18 10:04:38 +03:00
The tool will generate documentation for all the components that changed in the PR:
2024-03-26 23:00:57 +02:00
{width=768}
2024-03-06 21:52:11 +02:00
2024-03-26 23:00:57 +02:00
{width=768}
2023-10-01 19:51:15 +03:00
2024-04-18 10:04:38 +03:00
You can state a name of a specific component in the PR to get documentation only for that component:
```
/add_docs component_name
```
2024-03-06 21:52:11 +02:00
## Configuration options
2023-10-01 19:51:15 +03:00
- `docs_style` : The exact style of the documentation (for python docstring). you can choose between: `google` , `numpy` , `sphinx` , `restructuredtext` , `plain` . Default is `sphinx` .
2023-12-24 13:08:13 +02:00
- `extra_instructions` : Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
2024-03-06 21:52:11 +02:00
**Notes**
2024-03-31 12:15:29 +03:00
- Language that are currently fully supported: Python, Java, C++, JavaScript, TypeScript, C#.
2024-04-18 10:04:38 +03:00
- This tool can also be triggered interactively by using the [`analyze` ](./analyze.md ) tool.