aws-samples / lm-gvp
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 102 units with 1,036 lines of code in units (64.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (76 lines of code)
    • 12 medium size units (395 lines of code)
    • 16 small units (212 lines of code)
    • 73 very small units (353 lines of code)
0% | 7% | 38% | 20% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 7% | 38% | 20% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 63% | 30% | 0% | 5%
lmgvp0% | 0% | 40% | 21% | 38%
data0% | 0% | 45% | 27% | 26%
contact_map0% | 0% | 0% | 24% | 76%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in train.py
76 4 1
def get_dataset()
in lmgvp/data_loaders.py
50 13 3
def _featurize_as_graph()
in lmgvp/datasets.py
45 2 2
def _featurize_as_graph()
in lmgvp/datasets.py
44 1 2
def evaluate()
in train.py
37 8 3
def load_GO_annot()
in lmgvp/deepfrier_utils.py
36 9 1
def _forward()
in lmgvp/modules.py
32 9 3
def main()
in data/prepare_data.py
29 5 0
def _forward()
in lmgvp/modules.py
27 9 2
def __init__()
in lmgvp/datasets.py
26 2 3
def init_residue()
in data/xpdb.py
25 12 5
def idx_align()
in data/contact_map_utils.py
22 6 2
def chain_to_coords()
in data/prepare_GO_data.py
22 7 6
def parse_args()
in data/prepare_data.py
20 1 0
def _dihedrals()
in lmgvp/datasets.py
16 1 3
def load_GO_labels()
in lmgvp/data_loaders.py
16 2 1
def structure_to_coords()
in data/prepare_data.py
15 3 6
def _forward()
in lmgvp/modules.py
15 1 2
def get_energy()
in data/contact_map_utils.py
13 6 1
def load_state_dict_to_model()
in lmgvp/transfer.py
13 5 2