169 lines
9.2 KiB
Markdown
169 lines
9.2 KiB
Markdown
# Graph Report - /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr (2026-04-22)
|
|
|
|
## Corpus Check
|
|
- 20 files · ~5,118 words
|
|
- Verdict: corpus is large enough that graph structure adds value.
|
|
|
|
## Summary
|
|
- 77 nodes · 113 edges · 17 communities detected
|
|
- Extraction: 66% EXTRACTED · 34% INFERRED · 0% AMBIGUOUS · INFERRED: 38 edges (avg confidence: 0.67)
|
|
- Token cost: 0 input · 0 output
|
|
|
|
## Community Hubs (Navigation)
|
|
- [[_COMMUNITY_Community 0|Community 0]]
|
|
- [[_COMMUNITY_Community 1|Community 1]]
|
|
- [[_COMMUNITY_Community 2|Community 2]]
|
|
- [[_COMMUNITY_Community 3|Community 3]]
|
|
- [[_COMMUNITY_Community 4|Community 4]]
|
|
- [[_COMMUNITY_Community 5|Community 5]]
|
|
- [[_COMMUNITY_Community 6|Community 6]]
|
|
- [[_COMMUNITY_Community 7|Community 7]]
|
|
- [[_COMMUNITY_Community 8|Community 8]]
|
|
- [[_COMMUNITY_Community 9|Community 9]]
|
|
- [[_COMMUNITY_Community 10|Community 10]]
|
|
- [[_COMMUNITY_Community 11|Community 11]]
|
|
- [[_COMMUNITY_Community 12|Community 12]]
|
|
- [[_COMMUNITY_Community 13|Community 13]]
|
|
- [[_COMMUNITY_Community 14|Community 14]]
|
|
- [[_COMMUNITY_Community 15|Community 15]]
|
|
- [[_COMMUNITY_Community 16|Community 16]]
|
|
|
|
## God Nodes (most connected - your core abstractions)
|
|
1. `TesseractAdapter` - 12 edges
|
|
2. `parse_invoice_fields()` - 11 edges
|
|
3. `ManualAdapter` - 10 edges
|
|
4. `TestInvoiceOcrFlow` - 8 edges
|
|
5. `TestFieldParser` - 8 edges
|
|
6. `AccountMove` - 7 edges
|
|
7. `OCRResult` - 7 edges
|
|
8. `OCRProvider` - 7 edges
|
|
9. `TestTesseractAdapter` - 5 edges
|
|
10. `account.move OCR extension. Adds an OCR pipeline triggered manually (or, option` - 3 edges
|
|
|
|
## Surprising Connections (you probably didn't know these)
|
|
- `TestTesseractAdapter` --uses--> `TesseractAdapter` [INFERRED]
|
|
/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/tests/test_tesseract_adapter.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/services/ocr_providers/tesseract_adapter.py
|
|
- `Run OCR on the most recent supported attachment of each move.` --uses--> `TesseractAdapter` [INFERRED]
|
|
/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/models/account_move.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/services/ocr_providers/tesseract_adapter.py
|
|
- `Run OCR on the most recent supported attachment of each move.` --uses--> `ManualAdapter` [INFERRED]
|
|
/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/models/account_move.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/services/ocr_providers/manual_adapter.py
|
|
- `TesseractAdapter` --uses--> `OCRProvider` [INFERRED]
|
|
/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/services/ocr_providers/tesseract_adapter.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/services/ocr_providers/base.py
|
|
- `Tesseract OCR adapter. Uses the system tesseract binary via pytesseract, with p` --uses--> `OCRResult` [INFERRED]
|
|
/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/services/ocr_providers/tesseract_adapter.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_ocr/services/ocr_providers/base.py
|
|
|
|
## Communities
|
|
|
|
### Community 0 - "Community 0"
|
|
Cohesion: 0.2
|
|
Nodes (7): _empty_result(), _get_provider(), parse_invoice_fields(), Stage-2 of the OCR pipeline: parse raw OCR text into structured invoice fields v, Look up the LLM adapter via ir.config_parameter. Honours a feature-specific, Use the configured LLM provider to extract structured invoice fields. Retur, TestFieldParser
|
|
|
|
### Community 1 - "Community 1"
|
|
Cohesion: 0.28
|
|
Nodes (8): AccountMove, account.move OCR extension. Adds an OCR pipeline triggered manually (or, option, Apply parsed fields to a draft invoice without overwriting any user-ente, OCRResult, ManualAdapter, Manual fallback adapter - no real OCR, just marks the document as 'awaiting manu, OCRProvider, TesseractAdapter
|
|
|
|
### Community 2 - "Community 2"
|
|
Cohesion: 0.15
|
|
Nodes (8): ABC, is_available(), OCRProvider, OCRProvider contract - every backend must conform. Mirrors the LLMProvider patt, Abstract OCR backend. Subclasses implement extract()., Tesseract OCR adapter. Uses the system tesseract binary via pytesseract, with p, TestTesseractAdapter, TransactionCase
|
|
|
|
### Community 3 - "Community 3"
|
|
Cohesion: 0.19
|
|
Nodes (4): Run OCR on the most recent supported attachment of each move., FusionOcrController, request_for_invoice(), TestInvoiceOcrFlow
|
|
|
|
### Community 4 - "Community 4"
|
|
Cohesion: 0.5
|
|
Nodes (3): attachment_to_pages(), Helper: turn an ir.attachment into a list of PIL.Image pages. Kept separate fro, Decode an ir.attachment into a list of PIL.Image pages. Returns ``[]`` on f
|
|
|
|
### Community 5 - "Community 5"
|
|
Cohesion: 1.0
|
|
Nodes (1): FusionOcrLog
|
|
|
|
### Community 6 - "Community 6"
|
|
Cohesion: 1.0
|
|
Nodes (1): ResCompany
|
|
|
|
### Community 7 - "Community 7"
|
|
Cohesion: 1.0
|
|
Nodes (1): ResConfigSettings
|
|
|
|
### Community 8 - "Community 8"
|
|
Cohesion: 1.0
|
|
Nodes (0):
|
|
|
|
### Community 9 - "Community 9"
|
|
Cohesion: 1.0
|
|
Nodes (0):
|
|
|
|
### Community 10 - "Community 10"
|
|
Cohesion: 1.0
|
|
Nodes (0):
|
|
|
|
### Community 11 - "Community 11"
|
|
Cohesion: 1.0
|
|
Nodes (0):
|
|
|
|
### Community 12 - "Community 12"
|
|
Cohesion: 1.0
|
|
Nodes (0):
|
|
|
|
### Community 13 - "Community 13"
|
|
Cohesion: 1.0
|
|
Nodes (0):
|
|
|
|
### Community 14 - "Community 14"
|
|
Cohesion: 1.0
|
|
Nodes (0):
|
|
|
|
### Community 15 - "Community 15"
|
|
Cohesion: 1.0
|
|
Nodes (1): Extract text from raw bytes. ``mimetype`` hints whether to PDF-render (
|
|
|
|
### Community 16 - "Community 16"
|
|
Cohesion: 1.0
|
|
Nodes (1): Return True if the backend's runtime deps are present.
|
|
|
|
## Knowledge Gaps
|
|
- **13 isolated node(s):** `FusionOcrLog`, `ResCompany`, `ResConfigSettings`, `FusionOcrController`, `Stage-2 of the OCR pipeline: parse raw OCR text into structured invoice fields v` (+8 more)
|
|
These have ≤1 connection - possible missing edges or undocumented components.
|
|
- **Thin community `Community 5`** (2 nodes): `FusionOcrLog`, `fusion_ocr_log.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 6`** (2 nodes): `ResCompany`, `res_company.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 7`** (2 nodes): `ResConfigSettings`, `res_config_settings.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 8`** (1 nodes): `__init__.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 9`** (1 nodes): `__init__.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 10`** (1 nodes): `__init__.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 11`** (1 nodes): `__init__.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 12`** (1 nodes): `__init__.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 13`** (1 nodes): `__init__.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 14`** (1 nodes): `__manifest__.py`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 15`** (1 nodes): `Extract text from raw bytes. ``mimetype`` hints whether to PDF-render (`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
- **Thin community `Community 16`** (1 nodes): `Return True if the backend's runtime deps are present.`
|
|
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
|
|
|
## Suggested Questions
|
|
_Questions this graph is uniquely positioned to answer:_
|
|
|
|
- **Why does `parse_invoice_fields()` connect `Community 0` to `Community 1`?**
|
|
_High betweenness centrality (0.147) - this node is a cross-community bridge._
|
|
- **Why does `TesseractAdapter` connect `Community 1` to `Community 2`, `Community 3`?**
|
|
_High betweenness centrality (0.130) - this node is a cross-community bridge._
|
|
- **Why does `TestTesseractAdapter` connect `Community 2` to `Community 1`?**
|
|
_High betweenness centrality (0.084) - this node is a cross-community bridge._
|
|
- **Are the 9 inferred relationships involving `TesseractAdapter` (e.g. with `TestTesseractAdapter` and `AccountMove`) actually correct?**
|
|
_`TesseractAdapter` has 9 INFERRED edges - model-reasoned connections that need verification._
|
|
- **Are the 7 inferred relationships involving `parse_invoice_fields()` (e.g. with `.test_parser_handles_empty_text()` and `.test_parser_handles_no_provider_gracefully()`) actually correct?**
|
|
_`parse_invoice_fields()` has 7 INFERRED edges - model-reasoned connections that need verification._
|
|
- **Are the 7 inferred relationships involving `ManualAdapter` (e.g. with `AccountMove` and `account.move OCR extension. Adds an OCR pipeline triggered manually (or, option`) actually correct?**
|
|
_`ManualAdapter` has 7 INFERRED edges - model-reasoned connections that need verification._
|
|
- **What connects `FusionOcrLog`, `ResCompany`, `ResConfigSettings` to the rest of the system?**
|
|
_13 weakly-connected nodes found - possible documentation gaps or missing edges._ |