awslabs / dgl-lifesci
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 492 units with 8,611 lines of code in units (87.3% of code).
    • 13 very long units (2,072 lines of code)
    • 17 long units (1,120 lines of code)
    • 90 medium size units (2,594 lines of code)
    • 95 small units (1,378 lines of code)
    • 277 very small units (1,447 lines of code)
24% | 13% | 30% | 16% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py24% | 13% | 30% | 16% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python/dgllife/model/pretrain95% | 0% | 1% | 2% | <1%
python/dgllife/utils7% | 14% | 30% | 21% | 26%
python/dgllife/data0% | 22% | 54% | 11% | 11%
python/dgllife/model/model_zoo0% | 19% | 34% | 24% | 21%
python/dgllife/utils/jtvae0% | 30% | 41% | 10% | 16%
python/dgllife/model/gnn0% | 4% | 35% | 25% | 35%
python/dgllife/model/readout0% | 0% | 17% | 57% | 25%
python0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_tox21_model()
in python/dgllife/model/pretrain/moleculenet/tox21.py
192 19 1
def create_bbbp_model()
in python/dgllife/model/pretrain/moleculenet/bbbp.py
173 16 1
def create_sider_model()
in python/dgllife/model/pretrain/moleculenet/sider.py
173 16 1
def create_hiv_model()
in python/dgllife/model/pretrain/moleculenet/hiv.py
172 16 1
def create_toxcast_model()
in python/dgllife/model/pretrain/moleculenet/toxcast.py
172 16 1
def create_bace_model()
in python/dgllife/model/pretrain/moleculenet/bace.py
171 16 1
def create_pcba_model()
in python/dgllife/model/pretrain/moleculenet/pcba.py
162 15 1
def create_lipophilicity_model()
in python/dgllife/model/pretrain/moleculenet/lipophilicity.py
161 15 1
def create_freesolv_model()
in python/dgllife/model/pretrain/moleculenet/freesolv.py
161 15 1
def create_esol_model()
in python/dgllife/model/pretrain/moleculenet/esol.py
158 15 1
def create_muv_model()
in python/dgllife/model/pretrain/moleculenet/muv.py
157 15 1
def ACNN_graph_construction_and_featurization()
in python/dgllife/utils/complex_to_graph.py
116 15 9
def create_clintox_model()
in python/dgllife/model/pretrain/moleculenet/clintox.py
104 11 1
def _read_data_files()
in python/dgllife/data/pdbbind.py
87 32 6
def forward()
in python/dgllife/model/model_zoo/jtvae.py
78 22 4
def analyze_mols()
in python/dgllife/utils/analysis.py
77 19 4
def __init__()
in python/dgllife/data/uspto.py
75 12 13
def forward()
in python/dgllife/model/model_zoo/jtvae.py
74 11 3
def decode()
in python/dgllife/model/model_zoo/jtvae.py
74 17 3
def pre_process_one_reaction()
in python/dgllife/data/uspto.py
71 35 5