aws-samples / aws-open-data-satellite-lidar-tutorial
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 458 units with 9,427 lines of code in units (81.9% of code).
    • 8 very long units (1,030 lines of code)
    • 39 long units (2,634 lines of code)
    • 99 medium size units (3,164 lines of code)
    • 103 small units (1,525 lines of code)
    • 209 very small units (1,074 lines of code)
10% | 27% | 33% | 16% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py10% | 27% | 33% | 16% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
libs/apls15% | 41% | 30% | 8% | 2%
libs/solaris/data50% | 31% | 0% | 12% | 5%
libs/solaris/tile27% | 13% | 48% | 3% | 7%
libs/solaris/eval16% | 49% | 18% | 10% | 5%
libs/solaris/nets0% | 7% | 34% | 29% | 27%
libs/solaris/utils0% | 17% | 41% | 28% | 11%
libs/solaris/vector0% | 13% | 69% | 5% | 11%
libs/solaris/raster0% | 47% | 29% | 0% | 23%
networks0% | 0% | 11% | 47% | 40%
libs/apls/utils0% | 0% | 8% | 58% | 32%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def make_graphs_yuge()
in libs/apls/apls.py
175 51 10
def geojson2coco()
in libs/solaris/data/coco.py
162 31 16
def insert_point_into_G()
in libs/apls/apls.py
139 28 5
def make_graphs()
in libs/apls/apls.py
119 25 12
def wkt_to_G()
in libs/apls/wkt_to_G.py
114 36 1
def tile_generator()
in libs/solaris/tile/raster_tile.py
111 24 8
def execute()
in libs/apls/apls.py
106 15 17
def eval_iou_spacenet_csv()
in libs/solaris/eval/base.py
104 18 6
def df_to_coco_annos()
in libs/solaris/data/coco.py
99 15 11
def _get_road_buffer()
in libs/apls/apls_utils.py
98 10 11
def _refine_gt_graph()
in libs/apls/apls.py
97 9 8
def gather_files()
in libs/apls/apls.py
90 19 10
def plot_graph()
in libs/apls/plot_road.py
89 11 27
def build_wkt_dir()
in libs/apls/skeletonize.py
87 19 10
def eval_iou_return_GDFs()
in libs/solaris/eval/base.py
86 20 6
def train()
in libs/solaris/nets/train.py
81 24 1
def eval_iou()
in libs/solaris/eval/base.py
80 17 6
def make_dataset_csv()
in libs/solaris/utils/data.py
78 15 10
def path_sim_metric()
in libs/apls/apls.py
75 29 8
def f1()
in libs/solaris/eval/pixel.py
73 9 9