-
Notifications
You must be signed in to change notification settings - Fork 4
/
drd.json
540 lines (540 loc) · 36.8 KB
/
drd.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
{
"project_name": "DRD",
"last_updated": "2024-07-23T14:52:54.230919",
"files": [
{
"filename": "README.md",
"type": "md",
"last_modified": "2024-07-23T14:52:54.174727",
"content_preview": "",
"description": "Comprehensive README file for the Dravid (DRD) project, an AI-powered CLI coding framework. It includes detailed information about installation, usage, features, project structure, contributing guidelines, development setup, testing instructions, license details, and use cases for various programming languages and frameworks.",
"exports": "None"
},
{
"filename": "tests/api/test_dravid_api.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.178991",
"content_preview": "",
"description": "Unit tests for the dravid_api module in the DRD project. It tests various functions related to API calls, XML parsing, and response handling. The tests cover streaming API calls, XML parsing, step parsing, and both regular and vision API calls. It uses unittest and mock objects for testing.",
"exports": "None"
},
{
"filename": "src/drd/cli/ask_handler.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.181151",
"content_preview": "",
"description": "This module handles the 'ask' command functionality for the DRD CLI tool. It includes functions for reading file content, suggesting file alternatives, and processing user questions. The module interacts with the project metadata, Claude API for generating responses, and handles file-related operations.",
"exports": "fun:read_file_content,fun:suggest_file_alternative,fun:handle_ask_command"
},
{
"filename": "src/drd/prompts/instructions.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.183356",
"content_preview": "",
"description": "Contains a function that provides an instruction prompt for an advanced project setup assistant. The prompt outlines guidelines for generating precise, production-grade instructions for various programming projects, including XML formatting rules, important guidelines, and specific instructions for handling different scenarios.",
"exports": "fun:get_instruction_prompt"
},
{
"filename": "CONTRIBUTING.md",
"type": "md",
"last_modified": "2024-07-23T14:52:54.184727",
"content_preview": "",
"description": "CONTRIBUTING.md file providing guidelines for contributing to the Dravid (DRD) project. It includes sections on the code of conduct, how to report bugs, suggest enhancements, submit pull requests, and follow styleguides for git commits, Python code, and documentation. The file also outlines the project's labeling system for issues and pull requests.",
"exports": "None"
},
{
"filename": "tests/api/test_dravid_parser.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.186125",
"content_preview": "",
"description": "This file contains unit tests for the dravid_parser module in the DRD project. It tests various functions related to XML parsing, response handling, and pretty printing of commands. The tests cover functions like extract_outermost_xml, escape_nested_cdata, escape_special_characters, extract_and_parse_xml, parse_dravid_response, and pretty_print_commands.",
"exports": "None"
},
{
"filename": "src/drd/utils/api_utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.186983",
"content_preview": "",
"description": "This module contains utility functions for making API calls to the Claude AI service. It includes functions for calling the standard Claude API and the Claude Vision API, handling pagination, streaming responses, and parsing the results. The module also defines constants for API endpoints and configurations.",
"exports": "fun:get_api_key,fun:get_headers,fun:make_api_call,fun:parse_response,fun:call_dravid_api_with_pagination,fun:call_dravid_vision_api_with_pagination,fun:stream_claude_response,fun:parse_paginated_response,var:API_URL,var:MODEL,var:MAX_TOKENS"
},
{
"filename": "src/drd/prompts/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.187732",
"content_preview": "",
"description": "This is the __init__.py file for the prompts module in the DRD project. It imports and re-exports specific functions from other modules within the prompts package, making them easily accessible when importing from the prompts module. The exported functions are related to generating prompts for instructions, file identification, and file description.",
"exports": "fun:get_instruction_prompt,fun:get_file_identification_prompt,fun:get_file_description_prompt"
},
{
"filename": "poetry.lock",
"type": "lock",
"last_modified": "2024-07-23T14:52:54.188695",
"content_preview": "",
"description": "Poetry lock file containing detailed dependency information for the DRD project. It specifies exact versions and hashes for all direct and transitive dependencies, ensuring reproducible builds across different environments.",
"exports": "None"
},
{
"filename": "tests/metadata/test_common_utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.189805",
"content_preview": "",
"description": "This file contains unit tests for common utility functions in the DRD project's metadata module. It tests functions like parse_gitignore, should_ignore, get_folder_structure, get_ignore_patterns, generate_file_description, and find_file_with_dravid. The tests use unittest and mock objects to simulate file operations and API calls.",
"exports": "fun:TestCommonUtils"
},
{
"filename": "src/drd/cli/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.191009",
"content_preview": "",
"description": "This is the __init__.py file for the drd CLI module. It imports and re-exports key functions from submodules, making them available at the package level. This file facilitates easier imports for users of the DRD CLI tool.",
"exports": "fun:dravid_cli,fun:run_dev_server_with_monitoring"
},
{
"filename": "src/drd/prompts/metadata_update_prompts.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.193240",
"content_preview": "",
"description": "This module contains functions that generate prompts for updating metadata in the DRD project. It includes prompts for suggesting alternative file paths, identifying files that need metadata updates, and generating metadata for specific files. These prompts are designed to be used with an AI assistant to maintain and update project metadata.",
"exports": "fun:get_file_suggestion_prompt,fun:get_files_to_update_prompt"
},
{
"filename": "tests/utils/test_utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.194038",
"content_preview": "",
"description": "This file contains unit tests for utility functions in the DRD project. It tests various print functions (error, success, info, warning, debug, step) from the utils module. The tests use unittest and mock objects to verify the correct output formatting and color coding of messages.",
"exports": "None"
},
{
"filename": "LICENSE",
"type": "LICENSE",
"last_modified": "2024-07-23T14:52:54.194710",
"content_preview": "",
"description": "MIT License file for the DRD project, granting permission to use, modify, and distribute the software under certain conditions. It includes copyright information and disclaimers of warranty and liability.",
"exports": "None"
},
{
"filename": "tests/metadata/test_rate_limit_handler.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.195381",
"content_preview": "",
"description": "Unit test file for the rate_limit_handler module in the DRD project. It contains test cases for the RateLimiter class and process_files functions, verifying rate limiting functionality, API call handling, and concurrent file processing.",
"exports": "TestRateLimitHandler"
},
{
"filename": "src/drd/cli/main.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.196105",
"content_preview": "",
"description": "Main entry point for the DRD CLI tool. It defines the command-line interface using Click, sets up various options and arguments, and delegates the execution to the dravid_cli_logic function. The file also handles environment variable loading and colorama initialization for colored output.",
"exports": "fun:dravid_cli"
},
{
"filename": "src/drd/prompts/file_operations.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.196793",
"content_preview": "",
"description": "Contains prompts for file operations including identification, description, modification, and file finding",
"exports": "fun:get_file_identification_prompt,fun:get_file_description_prompt,fun:get_files_to_modify_prompt,fun:find_file_prompt"
},
{
"filename": "tests/utils/test_loader.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.197501",
"content_preview": "",
"description": "Unit tests for the Loader class and run_with_loader function from drd.utils.loader module. Tests cover loader animation, custom messages, start/stop functionality, and exception handling.",
"exports": "None"
},
{
"filename": "tests/metadata/test_updater.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.198232",
"content_preview": "",
"description": "Unit tests for the metadata updater functionality in the DRD project. Tests cover various scenarios of updating project metadata using the Dravid API, including successful updates, handling of files without changes, and error conditions. The file includes mocking of dependencies and thorough assertions to ensure correct behavior of the update_metadata_with_dravid function.",
"exports": "None"
},
{
"filename": "src/drd/cli/commands.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.199028",
"content_preview": "",
"description": "Main command handling module for the DRD CLI tool. It contains functions to handle various CLI commands including query execution, metadata initialization and updating, version checking, and asking open-ended questions. It also includes the core logic for the Dravid CLI, managing different command options and their respective actions.",
"exports": "fun:handle_query_command,fun:dravid_cli_logic,var:VERSION"
},
{
"filename": "src/drd/prompts/file_metada_desc_prompts.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.199712",
"content_preview": "",
"description": "This file contains a function that generates a prompt for file metadata extraction. It's part of the DRD project's prompts module, used to create context-aware prompts for AI-assisted metadata generation.",
"exports": "fun:get_file_metadata_prompt"
},
{
"filename": "pyproject.toml",
"type": "toml",
"last_modified": "2024-07-23T14:52:54.200403",
"content_preview": "",
"description": "Configuration file for the DRD project using Poetry. It defines project metadata, dependencies, development dependencies, build system, and CLI entry point. The project is a Python-based CLI tool named \"dravid\" with various functionalities for development assistance.",
"exports": "None"
},
{
"filename": "tests/cli/query/test_query_main.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.201088",
"content_preview": "",
"description": "Unit tests for the execute_dravid_command function in the drd.cli.query.main module. Tests cover various scenarios including debug mode, error handling, image processing, and API errors. The file uses unittest and mocking to simulate different conditions and verify the function's behavior.",
"exports": "None"
},
{
"filename": "tests/metadata/test_initializer.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.201747",
"content_preview": "",
"description": "Unit tests for the project metadata initializer module. It tests the initialize_project_metadata function, mocking various dependencies and verifying the correct creation and saving of project metadata.",
"exports": "None"
},
{
"filename": "src/drd/cli/monitor/error_resolver.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.202412",
"content_preview": "",
"description": "This module handles error resolution for the monitoring functionality in the DRD project. It includes a function to handle errors using the Dravid API, parse the response, and apply suggested fixes with user confirmation. The module integrates with the project's metadata management, API communication, and command execution utilities.",
"exports": "fun:monitoring_handle_error_with_dravid"
},
{
"filename": "src/drd/prompts/monitor_error_resolution.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.203086",
"content_preview": "",
"description": "This file contains a function to generate an error resolution prompt for the DRD project's monitoring system. It takes error details and project context as input and returns a formatted prompt for an AI assistant to provide error resolution steps.",
"exports": "fun:get_error_resolution_prompt"
},
{
"filename": "tests/utils/test_api_utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.203751",
"content_preview": "",
"description": "This file contains unit tests for the api_utils module in the DRD project. It tests various API-related functions including getting API keys, making API calls, parsing responses, and handling pagination for both text and vision API calls. The tests cover error handling, mocking of external dependencies, and verification of expected behaviors.",
"exports": "None"
},
{
"filename": "tests/metadata/test_project_metadata.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.204409",
"content_preview": "",
"description": "Unit tests for the ProjectMetadataManager class in the DRD project. Tests cover various functionalities including loading and saving metadata, updating file metadata, getting project context, updating dev server info, and updating metadata from files.",
"exports": "None"
},
{
"filename": "src/drd/cli/monitor/server_monitor.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.205079",
"content_preview": "",
"description": "This file contains the DevServerMonitor class and run_dev_server_with_monitoring function for monitoring and managing a development server. It handles server output, error detection, and server restarts. The class includes methods for starting, stopping, and restarting the server, as well as handling user input. The file is part of the DRD project's CLI monitor functionality.",
"exports": "fun:run_dev_server_with_monitoring,class:DevServerMonitor"
},
{
"filename": "src/drd/api/dravid_api.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.205741",
"content_preview": "",
"description": "This module contains functions for interacting with the Dravid API, including streaming responses, parsing XML, and calling different API endpoints. It provides functionality for both regular and vision-based API calls, as well as parsing and processing the responses. The module integrates with other utility functions from the project for API calls, error handling, and pretty printing.",
"exports": "fun:stream_dravid_api,fun:parse_streaming_xml,fun:parse_step,fun:call_dravid_api,fun:call_dravid_vision_api"
},
{
"filename": "conftest.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.206491",
"content_preview": "",
"description": "This file configures the Python test environment for the DRD project. It adds the project root to the Python path, ensuring that modules can be imported correctly during testing. This is crucial for maintaining a consistent testing environment across the project.",
"exports": "None"
},
{
"filename": "tests/utils/test_file_utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.207282",
"content_preview": "",
"description": "This file contains unit tests for various file utility functions in the DRD project. It tests functions like parse_file_list_response, get_file_content, parse_find_file_response, and fetch_project_guidelines. The tests use mocking to simulate file operations and XML parsing, ensuring the robustness of file handling utilities.",
"exports": "None"
},
{
"filename": "src/drd/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.208046",
"content_preview": "",
"description": "Main module for the DRD project, importing and exposing key functions from various submodules. It includes CLI functionality, metadata initialization and updating, and command execution capabilities.",
"exports": "fun:dravid_cli,fun:execute_dravid_command,fun:initialize_project_metadata,fun:update_metadata_with_dravid"
},
{
"filename": "src/drd/cli/monitor/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.208939",
"content_preview": "",
"description": "Initialization file for the monitor module within the DRD CLI. It exports the run_dev_server_with_monitoring function from the server_monitor module, making it available for use in other parts of the project. This file is part of the monitoring functionality, likely used for overseeing and managing the development server.",
"exports": "fun:run_dev_server_with_monitoring"
},
{
"filename": "src/drd/api/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.209768",
"content_preview": "",
"description": "This is the __init__.py file for the api module in the DRD project. It imports and re-exports key functions from the dravid_api and dravid_parser modules, making them easily accessible when importing from the api package. These functions are related to calling the Dravid API with pagination support and parsing the responses, including XML extraction.",
"exports": "fun:call_dravid_api_with_pagination,fun:call_dravid_vision_api_with_pagination,fun:parse_dravid_response,fun:extract_and_parse_xml"
},
{
"filename": "tests/utils/test_step_executor.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.210538",
"content_preview": "",
"description": "Unit tests for the Executor class in the step_executor module. Tests cover various file operations, command execution, JSON handling, and environment variable management. The tests use unittest framework with mocking to simulate file system operations and subprocess calls.",
"exports": "None"
},
{
"filename": "src/drd/main.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.211289",
"content_preview": "",
"description": "Main entry point for the DRD CLI tool. It imports and calls the dravid_cli function from the cli.main module when the script is run directly. This file serves as the starting point for the DRD application, initiating the command-line interface.",
"exports": "None"
},
{
"filename": "src/drd/cli/monitor/error_handlers.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.211998",
"content_preview": "",
"description": "This module contains error handling functions for the DRD project's monitoring feature. It includes handlers for module not found errors, syntax errors, and general errors. These handlers use the monitoring_handle_error_with_dravid function from the error_resolver module to process and potentially resolve errors.",
"exports": "fun:handle_module_not_found,fun:handle_syntax_error,fun:handle_general_error"
},
{
"filename": "src/drd/api/dravid_parser.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.212662",
"content_preview": "",
"description": "This module contains functions for parsing and processing XML responses from the Dravid API. It includes utilities for extracting XML content, escaping special characters, parsing the XML structure, and pretty-printing the parsed commands. The module is part of the DRD project's API handling components.",
"exports": "fun:extract_outermost_xml,fun:escape_nested_cdata,fun:escape_special_characters,fun:extract_and_parse_xml,fun:parse_dravid_response,fun:pretty_print_commands"
},
{
"filename": "project_guidelines.txt",
"type": "txt",
"last_modified": "2024-07-23T14:52:54.213325",
"content_preview": "",
"description": "Project guidelines document outlining coding standards and practices for the DRD project. It specifies not to use docstrings and to separate functions with multiple helpers into separate files. Also describes the role of the project context maintainer.",
"exports": "None"
},
{
"filename": "tests/utils/test_pretty_print_stream.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.214299",
"content_preview": "",
"description": "This file contains unit tests for the pretty_print_stream module in the DRD project. It tests various scenarios of the stream_and_print_commands function, including handling of XML-like chunks, different types of commands (shell, file operations), and various edge cases such as split tags and large content. The tests cover explanation printing, shell command handling, file operations, and CDATA content processing.",
"exports": "None"
},
{
"filename": "src/drd/utils/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.214954",
"content_preview": "",
"description": "Initializer module for the utils package in the DRD project. It imports and re-exports various utility functions from submodules, including printing functions, API call utilities, and a loader functionality. This module serves as a centralized access point for commonly used utilities across the project.",
"exports": "fun:print_error,fun:print_success,fun:print_info,fun:print_step,fun:print_debug,fun:print_warning,fun:call_dravid_api_with_pagination,fun:call_dravid_vision_api_with_pagination,class:Loader,fun:run_with_loader"
},
{
"filename": "src/drd/cli/query/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.215605",
"content_preview": "",
"description": "Initialization file for the query module within the DRD CLI tool. It imports and exports key functions from submodules related to executing Dravid commands, file operations, and image handling.",
"exports": "fun:execute_dravid_command,fun:get_files_to_modify,fun:handle_image_query"
},
{
"filename": "src/drd/prompts/error_resolution_prompt.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.216261",
"content_preview": "",
"description": "This file contains a function to generate an error resolution prompt for an AI assistant. It includes detailed instructions and guidelines for analyzing errors, providing resolution steps, and formatting the response in XML. The prompt includes context about the error, project details, and specific instructions for various scenarios.",
"exports": "fun:get_error_resolution_prompt"
},
{
"filename": "src/drd/metadata/project_metadata.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.216901",
"content_preview": "",
"description": "This file contains the ProjectMetadataManager class, which is responsible for managing project metadata. It handles loading, saving, and updating metadata for the project and individual files. The class provides methods for updating file metadata, removing file metadata, getting file metadata, updating dev server information, and retrieving project context. It plays a crucial role in maintaining the project's metadata for use by AI coding assistants.",
"exports": "class:ProjectMetadataManager"
},
{
"filename": "tests/cli/monitor/test_error_handlers.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.217555",
"content_preview": "",
"description": "This file contains unit tests for error handlers in the DRD CLI monitor module. It likely tests various error handling scenarios and functions related to error detection and resolution in the development server monitoring process.",
"exports": "None"
},
{
"filename": "src/drd/utils/pretty_print_stream.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.218194",
"content_preview": "",
"description": "This file contains utility functions for pretty-printing XML-formatted streams of data. It includes functionality to process and display different types of content such as explanations, file operations, and shell commands. The main function 'stream_and_print_commands' processes chunks of XML data and uses the 'pretty_print_xml_stream' function to handle the parsing and displaying of content.",
"exports": "fun:pretty_print_xml_stream,fun:stream_and_print_commands"
},
{
"filename": "src/drd/cli/query/image_handler.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.218846",
"content_preview": "",
"description": "This module handles image queries by interfacing with the Dravid Vision API. It provides a function to process image-based queries with optional instruction prompts, utilizing pagination for the API calls. This is part of the query functionality in the DRD CLI tool, specifically dealing with image-related operations.",
"exports": "fun:handle_image_query"
},
{
"filename": "src/drd/metadata/__init__.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.219471",
"content_preview": "",
"description": "This is the __init__.py file for the metadata package in the DRD project. It imports and re-exports key functions and classes from the metadata submodules, including initializer, updater, and project_metadata. This file serves as the main entry point for accessing metadata-related functionality in the DRD project.",
"exports": "fun:initialize_project_metadata,fun:update_metadata_with_dravid,class:ProjectMetadataManager"
},
{
"filename": "tests/cli/monitor/test_error_resolvers.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.220105",
"content_preview": "",
"description": "Unit tests for the error resolver functionality in the DRD project's monitoring system. It tests the 'monitoring_handle_error_with_dravid' function, covering scenarios where fixes are applied or rejected, and handling parse errors. The tests use mocking to simulate API calls, response parsing, and user inputs.",
"exports": "None"
},
{
"filename": "src/drd/utils/step_executor.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.220737",
"content_preview": "",
"description": "This file contains the Executor class, which is responsible for safely executing shell commands and performing file operations within the DRD project. It includes methods for checking command safety, executing shell commands, handling file operations (create, update, delete), parsing JSON, and retrieving folder structure. The class also manages environment variables and handles source commands.",
"exports": "class:Executor"
},
{
"filename": "src/drd/cli/query/main.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.221374",
"content_preview": "",
"description": "Main query handling module for the DRD CLI tool. It processes user queries, interacts with the Dravid API, handles image queries, executes commands, and manages project metadata. The module includes error handling and debugging features.",
"exports": "fun:execute_dravid_command"
},
{
"filename": "src/drd/metadata/updater.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.222003",
"content_preview": "",
"description": "This module handles updating project metadata based on a provided description. It uses the Dravid API to determine which files need updating, processes each file, and updates or removes metadata accordingly. Key functionalities include parsing API responses, handling file operations, and managing project metadata through the ProjectMetadataManager.",
"exports": "fun:update_metadata_with_dravid"
},
{
"filename": "tests/cli/monitor/test_dev_server_monitor.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.222638",
"content_preview": "",
"description": "Unit tests for the DevServerMonitor class and run_dev_server_with_monitoring function in the server_monitor module. Tests cover starting the monitor with custom commands, restarting the server, stopping the monitor, and running the dev server with monitoring. Uses unittest and mock objects to simulate server behavior and test error handling.",
"exports": "None"
},
{
"filename": "src/drd/utils/utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.223336",
"content_preview": "",
"description": "This file contains utility functions for colorized console output in the DRD project. It provides functions for printing error, success, info, warning, debug messages, and step progress. The file uses the click and colorama libraries for enhanced console output formatting.",
"exports": "fun:print_error,fun:print_success,fun:print_info,fun:print_warning,fun:print_debug,fun:print_step,var:METADATA_FILE"
},
{
"filename": "src/drd/cli/query/file_operations.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.223978",
"content_preview": "",
"description": "This module contains functions for file operations within the DRD project. It includes functionality to get files to modify based on a query and to find files using the Dravid API. The module interacts with project metadata, uses prompts for API calls, and handles file parsing and error reporting.",
"exports": "fun:get_files_to_modify,fun:find_file_with_dravid"
},
{
"filename": "src/drd/metadata/initializer.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.225148",
"content_preview": "",
"description": "This file contains the implementation for initializing project metadata. It includes functions to gather project information, process files, and create a structured metadata object. The module interacts with the Dravid API, handles file operations, and manages rate limiting for API calls. It's a core component of the DRD project's metadata management system.",
"exports": "fun:initialize_project_metadata,fun:initialize_project_metadata_sync"
},
{
"filename": "tests/cli/query/test_file_operations.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.225775",
"content_preview": "",
"description": "Unit tests for file operations in the DRD project's CLI query module. Tests cover functions for getting files to modify and finding files with Dravid API assistance. Includes mocking of API calls, file system operations, and logging functions.",
"exports": "None"
},
{
"filename": "src/drd/utils/loader.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.226409",
"content_preview": "",
"description": "This module provides a Loader class and a run_with_loader function for creating loading animations during long-running processes. It's part of the DRD project's utility modules, used to enhance user experience by providing visual feedback during operations.",
"exports": "class:Loader,fun:run_with_loader"
},
{
"filename": "src/drd/cli/query/dynamic_command_handler.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.227045",
"content_preview": "",
"description": "This module handles dynamic command execution for the DRD project. It contains functions for executing various types of commands (shell, file operations, metadata operations), error handling, and interacting with the Dravid API for error resolution. Key functionalities include command execution, error handling with Dravid API integration, and file metadata updates.",
"exports": "fun:execute_commands,fun:handle_shell_command,fun:handle_file_operation,fun:handle_metadata_operation,fun:update_file_metadata,fun:handle_error_with_dravid"
},
{
"filename": "src/drd/metadata/rate_limit_handler.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.227690",
"content_preview": "",
"description": "This module implements a rate limiter for API calls in the DRD project. It includes a RateLimiter class to manage concurrent requests and enforce rate limits, as well as functions for processing file metadata using the Dravid API. The module handles asynchronous operations and integrates with other project components like API utilities, parsers, and prompts.",
"exports": "class:RateLimiter,fun:process_single_file,fun:process_files,var:MAX_CONCURRENT_REQUESTS,var:MAX_CALLS_PER_MINUTE,var:RATE_LIMIT_PERIOD,var:rate_limiter"
},
{
"filename": "tests/cli/query/test_dynamic_command_handler.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.228345",
"content_preview": "",
"description": "Unit tests for the dynamic_command_handler module in the DRD project. This file contains comprehensive tests for various functions including execute_commands, handle_shell_command, handle_file_operation, handle_metadata_operation, update_file_metadata, and handle_error_with_dravid. It uses unittest and mock objects to simulate different scenarios and verify the correct behavior of these functions.",
"exports": "fun:TestDynamicCommandHandler"
},
{
"filename": "src/drd/utils/file_utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.228984",
"content_preview": "",
"description": "This file contains utility functions for file operations within the DRD project. It includes functions for parsing XML responses from file-related API calls, reading file contents, and fetching project guidelines. The module interacts with the project's API and utilizes error handling and information printing utilities.",
"exports": "fun:parse_file_list_response,fun:get_file_content,fun:parse_find_file_response,fun:fetch_project_guidelines"
},
{
"filename": "src/drd/prompts/get_project_info_prompts.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.229610",
"content_preview": "",
"description": "This file contains a function 'get_project_info_prompt' that generates a prompt for analyzing project structure and requesting information about the project. It's part of the DRD CLI tool's prompt generation system, used to gather project metadata.",
"exports": "fun:get_project_info_prompt"
},
{
"filename": "src/drd/metadata/common_utils.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.230274",
"content_preview": "",
"description": "This file contains utility functions for metadata handling in the DRD project. It includes functions for parsing .gitignore files, generating folder structures, and interacting with the Dravid API to generate file descriptions and suggestions. The module is part of the metadata management system and provides core functionality for file operations and project structure analysis.",
"exports": "fun:parse_gitignore,fun:should_ignore,fun:get_folder_structure,fun:get_ignore_patterns,fun:generate_file_description,fun:find_file_with_dravid"
},
{
"filename": "tests/cli/query/test_image_handler.py",
"type": "py",
"last_modified": "2024-07-23T14:52:54.230926",
"content_preview": "",
"description": "Unit tests for the image_handler module in the DRD project. Tests the handle_image_query function with and without instruction prompts, using mock API calls to simulate vision API responses.",
"exports": "None"
}
],
"dev_server": {
"start_command": "poetry run python src/drd/main.py",
"framework": "Custom CLI framework",
"language": "Python"
},
"description": "DRD appears to be a Python-based CLI tool with various functionalities including file operations, API interactions, metadata handling, and error resolution. It likely involves some form of project management or development assistance, with features for monitoring, querying, and possibly AI-assisted operations (given the presence of prompts and API utilities). The project seems well-structured with separate modules for different functionalities and corresponding test files."
}