aws-samples / research-pacs-on-aws
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 144 units with 2,217 lines of code in units (43.2% of code).
    • 3 very long units (387 lines of code)
    • 5 long units (346 lines of code)
    • 18 medium size units (540 lines of code)
    • 35 small units (523 lines of code)
    • 83 very small units (421 lines of code)
17% | 15% | 24% | 23% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py17% | 15% | 24% | 23% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python/de-identifier/research_pacs22% | 27% | 22% | 20% | 7%
python/website-worker/research_pacs50% | 0% | 21% | 28% | 0%
python/website/research_pacs20% | 11% | 20% | 35% | 12%
python/shared/research_pacs0% | 12% | 26% | 14% | 46%
python/change-pooler/research_pacs0% | 0% | 64% | 36% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def apply_transformations()
in python/de-identifier/research_pacs/de_identifier/dicom.py
167 72 2
def process_new_export()
in python/website-worker/research_pacs/website_worker/main.py
111 28 2
def search_page()
in python/website/research_pacs/website/main.py
109 9 0
def _validate_and_adapt_config_file()
in python/de-identifier/research_pacs/de_identifier/dicom.py
100 58 1
def translate_query_to_jsonpath()
in python/shared/research_pacs/shared/dicom_json.py
81 23 1
def export_page()
in python/website/research_pacs/website/main.py
59 6 0
def deidentify_dicom_orthanc()
in python/de-identifier/research_pacs/de_identifier/main.py
54 22 4
def process_new_dicom_orthanc()
in python/de-identifier/research_pacs/de_identifier/main.py
52 19 2
def main()
in python/de-identifier/research_pacs/de_identifier/main.py
50 15 0
def main()
in python/website-worker/research_pacs/website_worker/main.py
48 17 0
def main()
in python/change-pooler/research_pacs/change_pooler/main.py
48 20 0
def process_new_dicom()
in python/de-identifier/research_pacs/de_identifier/main.py
34 16 1
def get_box_coordinates()
in python/de-identifier/research_pacs/de_identifier/ocr.py
32 12 4
def log_http_request()
in python/website/research_pacs/website/log.py
30 7 2
def _validate_and_adapt_permissions_file()
in python/website/research_pacs/website/permission.py
29 16 1
def get_env()
in python/website/research_pacs/website/env.py
27 2 0
def get_env()
in python/de-identifier/research_pacs/de_identifier/env.py
27 12 0
def convert_dicom_to_json()
in python/shared/research_pacs/shared/dicom_json.py
26 21 1
def _request()
in python/shared/research_pacs/shared/orthanc.py
26 6 5
def load_file()
in python/shared/research_pacs/shared/util.py
26 10 4