awslabs / dgl-lifesci
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 492 units with 8,611 lines of code in units (87.3% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (275 lines of code)
    • 42 medium complex units (3,386 lines of code)
    • 47 simple units (1,150 lines of code)
    • 399 very simple units (3,800 lines of code)
0% | 3% | 39% | 13% | 44%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 3% | 39% | 13% | 44%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
python/dgllife/data0% | 8% | 23% | 18% | 48%
python/dgllife/utils/jtvae0% | 30% | 25% | 24% | 19%
python/dgllife/model/pretrain0% | 0% | 95% | 0% | 4%
python/dgllife/model/model_zoo0% | 0% | 23% | 11% | 65%
python/dgllife/utils0% | 0% | 24% | 24% | 51%
python/dgllife/model/gnn0% | 0% | 13% | 15% | 70%
python/dgllife/model/readout0% | 0% | 0% | 0% | 100%
python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def tree_decomp()
in python/dgllife/utils/jtvae/chemutils.py
67 40 2
def pre_process_one_reaction()
in python/dgllife/data/uspto.py
71 35 5
def _read_data_files()
in python/dgllife/data/pdbbind.py
87 32 6
def enum_attach()
in python/dgllife/utils/jtvae/chemutils.py
50 29 4
def forward()
in python/dgllife/model/model_zoo/jtvae.py
78 22 4
def dfs_assemble()
in python/dgllife/model/model_zoo/jtvae.py
51 22 10
def bookkeep_reactant()
in python/dgllife/data/uspto.py
43 21 2
def __init__()
in python/dgllife/model/gnn/gat.py
44 20 11
def create_tox21_model()
in python/dgllife/model/pretrain/moleculenet/tox21.py
192 19 1
def analyze_mols()
in python/dgllife/utils/analysis.py
77 19 4
def decode()
in python/dgllife/model/model_zoo/jtvae.py
74 17 3
def create_bbbp_model()
in python/dgllife/model/pretrain/moleculenet/bbbp.py
173 16 1
def create_hiv_model()
in python/dgllife/model/pretrain/moleculenet/hiv.py
172 16 1
def create_sider_model()
in python/dgllife/model/pretrain/moleculenet/sider.py
173 16 1
def create_bace_model()
in python/dgllife/model/pretrain/moleculenet/bace.py
171 16 1
def create_toxcast_model()
in python/dgllife/model/pretrain/moleculenet/toxcast.py
172 16 1
def decode()
in python/dgllife/model/model_zoo/jtvae.py
61 16 4
def __call__()
in python/dgllife/utils/featurizers.py
34 16 2
def create_pcba_model()
in python/dgllife/model/pretrain/moleculenet/pcba.py
162 15 1
def create_muv_model()
in python/dgllife/model/pretrain/moleculenet/muv.py
157 15 1