microsoft / botbuilder-python
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 1,168 units with 7,259 lines of code in units (25.9% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (239 lines of code)
    • 35 medium size units (979 lines of code)
    • 117 small units (1,620 lines of code)
    • 1,012 very small units (4,421 lines of code)
0% | 3% | 13% | 22% | 60%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 3% | 13% | 22% | 60%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
libraries/botframework-connector0% | 9% | 4% | 21% | 63%
libraries/botbuilder-ai0% | 10% | 9% | 35% | 43%
libraries/botbuilder-dialogs0% | 3% | 12% | 20% | 63%
libraries/botbuilder-applicationinsights0% | 0% | 34% | 27% | 37%
libraries/botbuilder-adapters-slack0% | 0% | 76% | 10% | 12%
libraries/botbuilder-schema0% | 0% | 9% | 22% | 68%
libraries/botbuilder-core0% | 0% | 7% | 18% | 73%
libraries/botbuilder-azure0% | 0% | 17% | 32% | 49%
libraries/botframework-streaming0% | 0% | 4% | 13% | 81%
generators/app0% | 0% | 0% | 55% | 44%
libraries/botbuilder-integration-aiohttp0% | 0% | 0% | 0% | 100%
libraries/botbuilder-testing0% | 0% | 0% | 0% | 100%
libraries/botbuilder-integration-applicationinsights-aiohttp0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _map_properties()
in libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer_v3.py
72 37 3
def egg2dist()
in libraries/botframework-connector/azure_bdist_wheel.py
59 15 3
def try_resolve_path()
in libraries/botbuilder-dialogs/botbuilder/dialogs/object_path.py
55 9 3
def run()
in libraries/botframework-connector/azure_bdist_wheel.py
53 4 1
def test_thrower()
in libraries/botbuilder-applicationinsights/django_tests/tests.py
48 1 1
def __init__()
in libraries/botbuilder-schema/botbuilder/schema/_models_py3.py
46 1 0
def test_logger()
in libraries/botbuilder-applicationinsights/django_tests/tests.py
41 1 1
def extract_entity_value()
in libraries/botbuilder-ai/botbuilder/ai/luis/luis_util.py
39 13 1
def activity_to_slack()
in libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_helper.py
37 15 1
def assign()
in libraries/botbuilder-dialogs/botbuilder/dialogs/object_path.py
35 15 4
def __get_or_create_container()
in libraries/botbuilder-azure/botbuilder/azure/cosmosdb_partitioned_storage.py
34 7 1
def test_bot_event()
in libraries/botbuilder-applicationinsights/django_tests/tests.py
32 1 1
def _track_change()
in libraries/botbuilder-dialogs/botbuilder/dialogs/memory/dialog_state_manager.py
32 9 3
def payload_to_activity()
in libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_helper.py
31 10 1
def _get_adaptive_card_invoke_value()
in libraries/botbuilder-core/botbuilder/core/activity_handler.py
29 4 2
def get_tag()
in libraries/botframework-connector/azure_bdist_wheel.py
29 13 1
def process_view()
in libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/django/middleware.py
27 10 5
def __init__()
in libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_request_body.py
26 5 2
def create_client()
in libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/django/common.py
26 7 2
def _update_attachment_streams()
in libraries/botbuilder-core/botbuilder/core/streaming/streaming_request_handler.py
26 11 2