feat: improve documentation quality with real data
- Extract file-level docstrings from Python files (module-level string expressions) - Use __init__.py docstrings as module doc_summary - Use file docstrings as file purpose in layout tables (instead of 'Source file') - Populate module outbound_modules/inbound_modules from import edges (internal only) - Make filename sanitization consistent (sanitize_for_link matches sanitize_filename) - Clean up stale .md files from previous runs before generating - Fill ARCHITECTURE.md template with real layout, modules index, and critical points - Add file_docstring field to ParsedModule and file_purpose to FileDoc
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
# Module: ../test-project/src/__init__.py
|
||||
|
||||
No summary available
|
||||
|
||||
## Symbols
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
// Example usage of module functions
|
||||
// TODO: Add real usage examples based on module analysis
|
||||
```
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
# Module: ../test-project/src/core.py
|
||||
|
||||
No summary available
|
||||
|
||||
## Symbols
|
||||
|
||||
### DatabaseManager
|
||||
|
||||
class DatabaseManager
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Class
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### __init__
|
||||
|
||||
def __init__(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### connect
|
||||
|
||||
def connect(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### execute_query
|
||||
|
||||
def execute_query(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### fetch_external_data
|
||||
|
||||
def fetch_external_data(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### process_user_data
|
||||
|
||||
def process_user_data(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 1
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
- sqlite3
|
||||
- requests
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
### Database Integrations
|
||||
- DatabaseManager
|
||||
- connect
|
||||
|
||||
### HTTP/API Integrations
|
||||
- fetch_external_data
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
// Example usage of module functions
|
||||
// TODO: Add real usage examples based on module analysis
|
||||
```
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# Module: ../test-project/src/utils.py
|
||||
|
||||
No summary available
|
||||
|
||||
## Symbols
|
||||
|
||||
### load_config
|
||||
|
||||
def load_config(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### save_config
|
||||
|
||||
def save_config(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### get_file_size
|
||||
|
||||
def get_file_size(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### format_bytes
|
||||
|
||||
def format_bytes(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
- json
|
||||
- os
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
// Example usage of module functions
|
||||
// TODO: Add real usage examples based on module analysis
|
||||
```
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Module: ./src/__init__.py
|
||||
|
||||
No summary available
|
||||
|
||||
## Symbols
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
// Example usage of module functions
|
||||
// TODO: Add real usage examples based on module analysis
|
||||
```
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
# Module: ./src/core.py
|
||||
|
||||
No summary available
|
||||
|
||||
## Symbols
|
||||
|
||||
### DatabaseManager
|
||||
|
||||
class DatabaseManager
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Class
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### __init__
|
||||
|
||||
def __init__(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### connect
|
||||
|
||||
def connect(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### execute_query
|
||||
|
||||
def execute_query(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### fetch_external_data
|
||||
|
||||
def fetch_external_data(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### process_user_data
|
||||
|
||||
def process_user_data(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 1
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
- sqlite3
|
||||
- requests
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
### Database Integrations
|
||||
- DatabaseManager
|
||||
- connect
|
||||
|
||||
### HTTP/API Integrations
|
||||
- fetch_external_data
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
// Example usage of module functions
|
||||
// TODO: Add real usage examples based on module analysis
|
||||
```
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# Module: ./src/utils.py
|
||||
|
||||
No summary available
|
||||
|
||||
## Symbols
|
||||
|
||||
### load_config
|
||||
|
||||
def load_config(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### save_config
|
||||
|
||||
def save_config(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### get_file_size
|
||||
|
||||
def get_file_size(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### format_bytes
|
||||
|
||||
def format_bytes(...)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
- json
|
||||
- os
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
// Example usage of module functions
|
||||
// TODO: Add real usage examples based on module analysis
|
||||
```
|
||||
|
||||
116
test-project/docs/architecture/modules/core.md
Normal file
116
test-project/docs/architecture/modules/core.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# Module: core
|
||||
|
||||
Core module with database and HTTP integrations.
|
||||
|
||||
## Symbols
|
||||
|
||||
### DatabaseManager
|
||||
|
||||
class DatabaseManager
|
||||
|
||||
Manages database connections and operations.
|
||||
|
||||
**Type:** Class
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 2
|
||||
- Fan-out: 4
|
||||
|
||||
### DatabaseManager.__init__
|
||||
|
||||
def __init__(self, db_path: str)
|
||||
|
||||
No documentation available
|
||||
|
||||
**Type:** Method
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
### DatabaseManager.connect
|
||||
|
||||
def connect(self)
|
||||
|
||||
Connect to the database.
|
||||
|
||||
**Type:** Method
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 1
|
||||
|
||||
### DatabaseManager.execute_query
|
||||
|
||||
def execute_query(self, query: str)
|
||||
|
||||
Execute a database query.
|
||||
|
||||
**Type:** Method
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 3
|
||||
|
||||
### fetch_external_data
|
||||
|
||||
def fetch_external_data(url: str)
|
||||
|
||||
Fetch data from an external API.
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 2
|
||||
- Fan-out: 2
|
||||
|
||||
### process_user_data
|
||||
|
||||
def process_user_data(user_id: int)
|
||||
|
||||
Process user data with database and external API calls.
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 4
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
- sqlite3
|
||||
- requests
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
### Database Integrations
|
||||
- DatabaseManager
|
||||
- DatabaseManager.connect
|
||||
|
||||
### HTTP/API Integrations
|
||||
- fetch_external_data
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
from core import DatabaseManager
|
||||
instance = DatabaseManager()
|
||||
```
|
||||
|
||||
```python
|
||||
from core import fetch_external_data
|
||||
result = fetch_external_data(url)
|
||||
```
|
||||
|
||||
```python
|
||||
from core import process_user_data
|
||||
result = process_user_data(user_id)
|
||||
```
|
||||
|
||||
26
test-project/docs/architecture/modules/src.md
Normal file
26
test-project/docs/architecture/modules/src.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Module: src
|
||||
|
||||
Test project package.
|
||||
|
||||
## Symbols
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
import src
|
||||
```
|
||||
|
||||
92
test-project/docs/architecture/modules/utils.md
Normal file
92
test-project/docs/architecture/modules/utils.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# Module: utils
|
||||
|
||||
Utility functions for the test project.
|
||||
|
||||
## Symbols
|
||||
|
||||
### load_config
|
||||
|
||||
def load_config(config_path: str)
|
||||
|
||||
Load configuration from a JSON file.
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 2
|
||||
|
||||
### save_config
|
||||
|
||||
def save_config(config: dict, config_path: str)
|
||||
|
||||
Save configuration to a JSON file.
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 2
|
||||
|
||||
### get_file_size
|
||||
|
||||
def get_file_size(filepath: str)
|
||||
|
||||
Get the size of a file in bytes.
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 1
|
||||
|
||||
### format_bytes
|
||||
|
||||
def format_bytes(size: int)
|
||||
|
||||
Format bytes into a human-readable string.
|
||||
|
||||
**Type:** Function
|
||||
|
||||
**Metrics:**
|
||||
- Fan-in: 0
|
||||
- Fan-out: 0
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Imports
|
||||
- json
|
||||
- os
|
||||
|
||||
### Outbound Modules
|
||||
|
||||
### Inbound Modules
|
||||
|
||||
## Integrations
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```python
|
||||
from utils import load_config
|
||||
result = load_config(config_path)
|
||||
```
|
||||
|
||||
```python
|
||||
from utils import save_config
|
||||
result = save_config(config, config_path)
|
||||
```
|
||||
|
||||
```python
|
||||
from utils import get_file_size
|
||||
result = get_file_size(filepath)
|
||||
```
|
||||
|
||||
```python
|
||||
from utils import format_bytes
|
||||
result = format_bytes(size)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user