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:
276
test-project/docs/architecture/files/src__core.py.md
Normal file
276
test-project/docs/architecture/files/src__core.py.md
Normal file
@@ -0,0 +1,276 @@
|
||||
# File: ./src/core.py
|
||||
|
||||
- **Module:** core
|
||||
- **Defined symbols:** 6
|
||||
- **Imports:** 2
|
||||
|
||||
<!-- MANUAL:BEGIN -->
|
||||
## File intent (manual)
|
||||
<FILL_MANUALLY>
|
||||
<!-- MANUAL:END -->
|
||||
|
||||
---
|
||||
|
||||
## Imports & file-level dependencies
|
||||
<!-- ARCHDOC:BEGIN section=file_imports -->
|
||||
> Generated. Do not edit inside this block.
|
||||
- sqlite3
|
||||
- requests
|
||||
<!-- ARCHDOC:END section=file_imports -->
|
||||
|
||||
---
|
||||
|
||||
## Symbols index
|
||||
<!-- ARCHDOC:BEGIN section=symbols_index -->
|
||||
> Generated. Do not edit inside this block.
|
||||
- `DatabaseManager` (Class)
|
||||
- `DatabaseManager.__init__` (Method)
|
||||
- `DatabaseManager.connect` (Method)
|
||||
- `DatabaseManager.execute_query` (Method)
|
||||
- `fetch_external_data` (Function)
|
||||
- `process_user_data` (Function)
|
||||
<!-- ARCHDOC:END section=symbols_index -->
|
||||
|
||||
---
|
||||
|
||||
## Symbol details
|
||||
|
||||
<!-- ARCHDOC:BEGIN symbol id=DatabaseManager --><a id="DatabaseManager"></a>
|
||||
|
||||
### `DatabaseManager`
|
||||
- **Kind:** Class
|
||||
- **Signature:** `class DatabaseManager`
|
||||
- **Docstring:** `Manages database connections and operations.`
|
||||
|
||||
#### What it does
|
||||
<!-- ARCHDOC:BEGIN section=purpose -->
|
||||
extracted from AST
|
||||
<!-- ARCHDOC:END section=purpose -->
|
||||
|
||||
#### Relations
|
||||
<!-- ARCHDOC:BEGIN section=relations -->
|
||||
**Outbound calls (best-effort):**
|
||||
|
||||
**Inbound (used by) (best-effort):**
|
||||
<!-- ARCHDOC:END section=relations -->
|
||||
|
||||
#### Integrations (heuristic)
|
||||
<!-- ARCHDOC:BEGIN section=integrations -->
|
||||
- HTTP: no
|
||||
- DB: yes
|
||||
- Queue/Tasks: no
|
||||
<!-- ARCHDOC:END section=integrations -->
|
||||
|
||||
#### Risk / impact
|
||||
<!-- ARCHDOC:BEGIN section=impact -->
|
||||
- fan-in: 2
|
||||
- fan-out: 4
|
||||
- cycle participant: no
|
||||
- critical: no
|
||||
<!-- ARCHDOC:END section=impact -->
|
||||
|
||||
<!-- MANUAL:BEGIN -->
|
||||
#### Manual notes
|
||||
<FILL_MANUALLY>
|
||||
<!-- MANUAL:END -->
|
||||
<!-- ARCHDOC:END symbol id=DatabaseManager -->
|
||||
|
||||
<!-- ARCHDOC:BEGIN symbol id=DatabaseManager.__init__ --><a id="DatabaseManager.__init__"></a>
|
||||
|
||||
### `DatabaseManager.__init__`
|
||||
- **Kind:** Method
|
||||
- **Signature:** `def __init__(self, db_path: str)`
|
||||
- **Docstring:** `No documentation available`
|
||||
|
||||
#### What it does
|
||||
<!-- ARCHDOC:BEGIN section=purpose -->
|
||||
extracted from AST
|
||||
<!-- ARCHDOC:END section=purpose -->
|
||||
|
||||
#### Relations
|
||||
<!-- ARCHDOC:BEGIN section=relations -->
|
||||
**Outbound calls (best-effort):**
|
||||
|
||||
**Inbound (used by) (best-effort):**
|
||||
<!-- ARCHDOC:END section=relations -->
|
||||
|
||||
#### Integrations (heuristic)
|
||||
<!-- ARCHDOC:BEGIN section=integrations -->
|
||||
- HTTP: no
|
||||
- DB: no
|
||||
- Queue/Tasks: no
|
||||
<!-- ARCHDOC:END section=integrations -->
|
||||
|
||||
#### Risk / impact
|
||||
<!-- ARCHDOC:BEGIN section=impact -->
|
||||
- fan-in: 0
|
||||
- fan-out: 0
|
||||
- cycle participant: no
|
||||
- critical: no
|
||||
<!-- ARCHDOC:END section=impact -->
|
||||
|
||||
<!-- MANUAL:BEGIN -->
|
||||
#### Manual notes
|
||||
<FILL_MANUALLY>
|
||||
<!-- MANUAL:END -->
|
||||
<!-- ARCHDOC:END symbol id=DatabaseManager.__init__ -->
|
||||
|
||||
<!-- ARCHDOC:BEGIN symbol id=DatabaseManager.connect --><a id="DatabaseManager.connect"></a>
|
||||
|
||||
### `DatabaseManager.connect`
|
||||
- **Kind:** Method
|
||||
- **Signature:** `def connect(self)`
|
||||
- **Docstring:** `Connect to the database.`
|
||||
|
||||
#### What it does
|
||||
<!-- ARCHDOC:BEGIN section=purpose -->
|
||||
extracted from AST
|
||||
<!-- ARCHDOC:END section=purpose -->
|
||||
|
||||
#### Relations
|
||||
<!-- ARCHDOC:BEGIN section=relations -->
|
||||
**Outbound calls (best-effort):**
|
||||
|
||||
**Inbound (used by) (best-effort):**
|
||||
<!-- ARCHDOC:END section=relations -->
|
||||
|
||||
#### Integrations (heuristic)
|
||||
<!-- ARCHDOC:BEGIN section=integrations -->
|
||||
- HTTP: no
|
||||
- DB: yes
|
||||
- Queue/Tasks: no
|
||||
<!-- ARCHDOC:END section=integrations -->
|
||||
|
||||
#### Risk / impact
|
||||
<!-- ARCHDOC:BEGIN section=impact -->
|
||||
- fan-in: 0
|
||||
- fan-out: 1
|
||||
- cycle participant: no
|
||||
- critical: no
|
||||
<!-- ARCHDOC:END section=impact -->
|
||||
|
||||
<!-- MANUAL:BEGIN -->
|
||||
#### Manual notes
|
||||
<FILL_MANUALLY>
|
||||
<!-- MANUAL:END -->
|
||||
<!-- ARCHDOC:END symbol id=DatabaseManager.connect -->
|
||||
|
||||
<!-- ARCHDOC:BEGIN symbol id=DatabaseManager.execute_query --><a id="DatabaseManager.execute_query"></a>
|
||||
|
||||
### `DatabaseManager.execute_query`
|
||||
- **Kind:** Method
|
||||
- **Signature:** `def execute_query(self, query: str)`
|
||||
- **Docstring:** `Execute a database query.`
|
||||
|
||||
#### What it does
|
||||
<!-- ARCHDOC:BEGIN section=purpose -->
|
||||
extracted from AST
|
||||
<!-- ARCHDOC:END section=purpose -->
|
||||
|
||||
#### Relations
|
||||
<!-- ARCHDOC:BEGIN section=relations -->
|
||||
**Outbound calls (best-effort):**
|
||||
|
||||
**Inbound (used by) (best-effort):**
|
||||
<!-- ARCHDOC:END section=relations -->
|
||||
|
||||
#### Integrations (heuristic)
|
||||
<!-- ARCHDOC:BEGIN section=integrations -->
|
||||
- HTTP: no
|
||||
- DB: no
|
||||
- Queue/Tasks: no
|
||||
<!-- ARCHDOC:END section=integrations -->
|
||||
|
||||
#### Risk / impact
|
||||
<!-- ARCHDOC:BEGIN section=impact -->
|
||||
- fan-in: 0
|
||||
- fan-out: 3
|
||||
- cycle participant: no
|
||||
- critical: no
|
||||
<!-- ARCHDOC:END section=impact -->
|
||||
|
||||
<!-- MANUAL:BEGIN -->
|
||||
#### Manual notes
|
||||
<FILL_MANUALLY>
|
||||
<!-- MANUAL:END -->
|
||||
<!-- ARCHDOC:END symbol id=DatabaseManager.execute_query -->
|
||||
|
||||
<!-- ARCHDOC:BEGIN symbol id=fetch_external_data --><a id="fetch_external_data"></a>
|
||||
|
||||
### `fetch_external_data`
|
||||
- **Kind:** Function
|
||||
- **Signature:** `def fetch_external_data(url: str)`
|
||||
- **Docstring:** `Fetch data from an external API.`
|
||||
|
||||
#### What it does
|
||||
<!-- ARCHDOC:BEGIN section=purpose -->
|
||||
extracted from AST
|
||||
<!-- ARCHDOC:END section=purpose -->
|
||||
|
||||
#### Relations
|
||||
<!-- ARCHDOC:BEGIN section=relations -->
|
||||
**Outbound calls (best-effort):**
|
||||
|
||||
**Inbound (used by) (best-effort):**
|
||||
<!-- ARCHDOC:END section=relations -->
|
||||
|
||||
#### Integrations (heuristic)
|
||||
<!-- ARCHDOC:BEGIN section=integrations -->
|
||||
- HTTP: yes
|
||||
- DB: no
|
||||
- Queue/Tasks: no
|
||||
<!-- ARCHDOC:END section=integrations -->
|
||||
|
||||
#### Risk / impact
|
||||
<!-- ARCHDOC:BEGIN section=impact -->
|
||||
- fan-in: 2
|
||||
- fan-out: 2
|
||||
- cycle participant: no
|
||||
- critical: no
|
||||
<!-- ARCHDOC:END section=impact -->
|
||||
|
||||
<!-- MANUAL:BEGIN -->
|
||||
#### Manual notes
|
||||
<FILL_MANUALLY>
|
||||
<!-- MANUAL:END -->
|
||||
<!-- ARCHDOC:END symbol id=fetch_external_data -->
|
||||
|
||||
<!-- ARCHDOC:BEGIN symbol id=process_user_data --><a id="process_user_data"></a>
|
||||
|
||||
### `process_user_data`
|
||||
- **Kind:** Function
|
||||
- **Signature:** `def process_user_data(user_id: int)`
|
||||
- **Docstring:** `Process user data with database and external API calls.`
|
||||
|
||||
#### What it does
|
||||
<!-- ARCHDOC:BEGIN section=purpose -->
|
||||
extracted from AST
|
||||
<!-- ARCHDOC:END section=purpose -->
|
||||
|
||||
#### Relations
|
||||
<!-- ARCHDOC:BEGIN section=relations -->
|
||||
**Outbound calls (best-effort):**
|
||||
|
||||
**Inbound (used by) (best-effort):**
|
||||
<!-- ARCHDOC:END section=relations -->
|
||||
|
||||
#### Integrations (heuristic)
|
||||
<!-- ARCHDOC:BEGIN section=integrations -->
|
||||
- HTTP: no
|
||||
- DB: no
|
||||
- Queue/Tasks: no
|
||||
<!-- ARCHDOC:END section=integrations -->
|
||||
|
||||
#### Risk / impact
|
||||
<!-- ARCHDOC:BEGIN section=impact -->
|
||||
- fan-in: 0
|
||||
- fan-out: 4
|
||||
- cycle participant: no
|
||||
- critical: no
|
||||
<!-- ARCHDOC:END section=impact -->
|
||||
|
||||
<!-- MANUAL:BEGIN -->
|
||||
#### Manual notes
|
||||
<FILL_MANUALLY>
|
||||
<!-- MANUAL:END -->
|
||||
<!-- ARCHDOC:END symbol id=process_user_data -->
|
||||
Reference in New Issue
Block a user