aws-samples / amazon-textract-textractor
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 289 units with 3,054 lines of code in units (79.4% of code).
    • 1 very long units (116 lines of code)
    • 7 long units (538 lines of code)
    • 36 medium size units (1,031 lines of code)
    • 41 small units (610 lines of code)
    • 204 very small units (759 lines of code)
3% | 17% | 33% | 19% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 17% | 33% | 19% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tpipelinegeofinder/textractgeofinder10% | 27% | 31% | 17% | 12%
caller/textractcaller0% | 35% | 23% | 16% | 24%
overlayer/textractoverlayer0% | 43% | 0% | 10% | 46%
src0% | 4% | 35% | 21% | 38%
prettyprinter/textractprettyprinter0% | 0% | 62% | 37% | 0%
tpipelinepagedimensions/textractpagedimensions0% | 0% | 45% | 22% | 32%
helper0% | 0% | 83% | 0% | 16%
tpipelinegeofinder0% | 0% | 0% | 0% | 100%
caller0% | 0% | 0% | 0% | 100%
prettyprinter0% | 0% | 0% | 0% | 100%
overlayer0% | 0% | 0% | 0% | 100%
tpipelinepagedimensions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in tpipelinegeofinder/textractgeofinder/tword.py
116 35 19
def __fill_sql_from_textract_json()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
100 15 1
def call_textract()
in caller/textractcaller/t_call.py
100 27 12
def add_key_value_lables()
in tpipelinegeofinder/textractgeofinder/sample_patient_intake_form_parser.py
91 1 1
def __find_phrase_on_page()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
70 20 7
def get_bounding_boxes()
in overlayer/textractoverlayer/t_overlay.py
70 33 3
56 9 9
def find_intersect_value()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
51 6 8
def find_phrase_in_lines()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
50 17 4
def find_phrase_on_page()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
47 8 7
def validateInput()
in src/textractor.py
43 8 2
def _callTextract()
in src/tdp.py
39 7 1
def get_full_json()
in caller/textractcaller/t_call.py
39 7 4
def execute()
in tpipelinegeofinder/textractgeofinder/ocrdb.py
32 7 7
def __init__()
in src/tdp.py
32 19 7
32 14 1
def _insights()
in src/og.py
32 4 8
def get_TWord_from_TBlock()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
31 4 2
def get_values_for_phrase_coordinate()
in tpipelinegeofinder/textractgeofinder/tgeofinder.py
31 12 2
def processDocument()
in src/trptest.py
31 12 1