💎 Documentation
Overview¶
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.).
It can be invoked manually by commenting on any PR:
Example usage¶
Invoke the tool manually by commenting /add_docs
on any PR:
The tool will generate documentation for all the components that changed in the PR:
You can state a name of a specific component in the PR to get documentation only for that component:
Manual triggering¶
Comment /add_docs
on a PR to invoke it manually.
Automatic triggering¶
To automatically run the add_docs
tool when a pull request is opened, define in a configuration file:
The pr_commands
list defines commands that run automatically when a PR is opened.
Since this is under the [github_app] section, it only applies when using the Qodo Merge GitHub App in GitHub environments.
Note
By default, /add_docs is not triggered automatically. You must explicitly include it in pr_commands to enable this behavior.
Configuration options¶
docs_style
: The exact style of the documentation (for python docstring). you can choose between:google
,numpy
,sphinx
,restructuredtext
,plain
. Default issphinx
.extra_instructions
: Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
Notes
- The following languages are currently supported: Python, Java, C++, JavaScript, TypeScript, C#.
- This tool can also be triggered interactively by using the
analyze
tool.