Main¶
clean()
¶
Removes generated files and reports completion.
This command cleans up any generated fake files from the project.
Returns:
Type | Description |
---|---|
None |
Source code in repo_agent/main.py
cli()
¶
Entry point for the command-line interface. Provides access to all application commands and options.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version_number
|
The version number of the application. |
required |
Returns:
Type | Description |
---|---|
None |
Source code in repo_agent/main.py
diff()
¶
Identifies documentation updates needed based on changes in the source code. It simulates a documentation generation run to preview which documents would be created or modified, without altering existing files.
This command compares the existing documentation with the source code to identify which documents need to be generated or updated. It uses fake files to simulate the documentation generation process without actually modifying any real files.
Returns:
Type | Description |
---|---|
None |
Source code in repo_agent/main.py
handle_setting_error(e)
¶
Reports configuration issues to the user and terminates execution. Specifically, it identifies missing or invalid settings, provides informative error messages highlighting the problematic fields, and then halts program operation with a clear indication of the failure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
e
|
ValidationError
|
The ValidationError instance containing the error details. |
required |
Returns:
Type | Description |
---|---|
None |
|
Raises a click.ClickException if there are configuration errors. |
Source code in repo_agent/main.py
run(model, temperature, request_timeout, base_url, target_repo_path, hierarchy_path, markdown_docs_path, ignore_list, language, max_thread_count, log_level, print_hierarchy)
¶
Orchestrates the documentation creation for a codebase, configuring settings like the target repository, output paths, and model parameters before executing the generation process. Optionally prints the project's hierarchical structure after completion.
This method initializes settings, runs the documentation runner, and optionally prints the repository hierarchy.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
Specifies the model to use for completion. |
required | |
temperature
|
Sets the generation temperature for the model. Lower values make the model more deterministic. |
required | |
request_timeout
|
Defines the timeout in seconds for the API request. |
required | |
base_url
|
The base URL for the API calls. |
required | |
target_repo_path
|
The file system path to the target repository. This path is used as the root for documentation generation. |
required | |
hierarchy_path
|
The name or path for the project hierarchy file, used to organize documentation structure. |
required | |
markdown_docs_path
|
The folder path where Markdown documentation will be stored or generated. |
required | |
ignore_list
|
A comma-separated list of files or directories to ignore during documentation generation. |
required | |
language
|
The ISO 639 code or language name for the documentation. |
required | |
max_thread_count
|
The maximum number of threads to use for processing. |
required | |
log_level
|
Sets the logging level (e.g., DEBUG, INFO, WARNING, ERROR, CRITICAL) for the application. |
required | |
print_hierarchy
|
If set, prints the hierarchy of the target repository when finished running the main task. |
required |
Returns:
Type | Description |
---|---|
None |
Source code in repo_agent/main.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
run_outside_cli(model, temperature, request_timeout, base_url, target_repo_path, hierarchy_path, markdown_docs_path, ignore_list, language, max_thread_count, log_level, print_hierarchy)
¶
Orchestrates the documentation generation for a given repository, utilizing provided settings and running the core processing logic. It initializes configurations, handles potential errors during setup, executes the documentation runner, and outputs success messages along with an optional hierarchical view of the target repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
The model to use for generating documentation. |
required | |
temperature
|
The temperature to use for the model. |
required | |
request_timeout
|
The request timeout in seconds. |
required | |
base_url
|
The base URL for the OpenAI API. |
required | |
target_repo_path
|
The path to the target repository. |
required | |
hierarchy_path
|
The path to the hierarchy file. |
required | |
markdown_docs_path
|
The path to store markdown documentation. |
required | |
ignore_list
|
A comma-separated list of files or directories to ignore. |
required | |
language
|
The programming language of the repository. |
required | |
max_thread_count
|
The maximum number of threads to use. |
required | |
log_level
|
The log level to set. |
required | |
print_hierarchy
|
Whether to print the target repo hierarchical tree. |
required |
Returns:
Type | Description |
---|---|
None. Prints success messages and optionally the hierarchy to the console. |