aws / graph-notebook
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 349 units with 5,646 lines of code in units (66.8% of code).
    • 10 very long units (1,717 lines of code)
    • 7 long units (487 lines of code)
    • 40 medium size units (1,165 lines of code)
    • 79 small units (1,123 lines of code)
    • 213 very small units (1,154 lines of code)
30% | 8% | 20% | 19% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py31% | 8% | 21% | 19% | 19%
js0% | 0% | 0% | 48% | 51%
ts0% | 0% | 0% | 25% | 74%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/graph_notebook/magics54% | 13% | 12% | 12% | 7%
src/graph_notebook/network21% | 14% | 33% | 13% | 17%
src/graph_notebook/notebooks19% | 0% | 35% | 27% | 18%
ROOT0% | 0% | 37% | 38% | 23%
src/graph_notebook/neptune0% | 0% | 9% | 32% | 57%
src/graph_notebook/visualization0% | 0% | 64% | 0% | 35%
src/graph_notebook/decorators0% | 0% | 30% | 31% | 37%
src/graph_notebook/nbextensions0% | 0% | 21% | 27% | 51%
src/graph_notebook/configuration0% | 0% | 0% | 62% | 37%
src/graph_notebook/widgets0% | 0% | 0% | 20% | 79%
src/graph_notebook/seed0% | 0% | 0% | 48% | 51%
src/graph_notebook0% | 0% | 0% | 65% | 34%
src/graph_notebook/options0% | 0% | 0% | 100% | 0%
src/graph_notebook/static_resources0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def load()
in src/graph_notebook/magics/graph_magic.py
428 44 3
def generate_neptune_ml_parser()
in src/graph_notebook/magics/ml.py
282 1 0
def seed()
in src/graph_notebook/magics/graph_magic.py
157 7 2
def sparql()
in src/graph_notebook/magics/graph_magic.py
142 24 4
def gremlin()
in src/graph_notebook/magics/graph_magic.py
140 16 4
def db_reset()
in src/graph_notebook/magics/graph_magic.py
129 14 2
def add_vertex()
in src/graph_notebook/network/gremlin/GremlinNetwork.py
120 9 2
def setup_pretrained_endpoints()
in src/graph_notebook/notebooks/04-Machine-Learning/neptune_ml_utils.py
111 31 7
def add_results()
in src/graph_notebook/network/sparql/SPARQLNetwork.py
106 31 2
def handle_opencypher_query()
in src/graph_notebook/magics/graph_magic.py
102 17 4
def add_path_edge()
in src/graph_notebook/network/gremlin/GremlinNetwork.py
86 30 5
def neptune_ml_training()
in src/graph_notebook/magics/ml.py
77 23 4
def neptune_ml_endpoint()
in src/graph_notebook/magics/ml.py
73 24 4
def add_results_with_pattern()
in src/graph_notebook/network/gremlin/GremlinNetwork.py
69 47 3
def neptune_ml_dataprocessing()
in src/graph_notebook/magics/ml.py
65 22 4
def modeltransform_start()
in src/graph_notebook/magics/ml.py
63 19 3
def set_gremlin_profile_metrics()
in src/graph_notebook/magics/metadata.py
54 15 2
def parse_node()
in src/graph_notebook/network/opencypher/OCNetwork.py
48 20 3
def __process_ratings_users()
in src/graph_notebook/notebooks/04-Machine-Learning/neptune_ml_utils.py
46 12 1
def __process_movies_genres()
in src/graph_notebook/notebooks/04-Machine-Learning/neptune_ml_utils.py
45 7 1