aws / aws-step-functions-data-science-sdk-python
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 270 units with 1,968 lines of code in units (76.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (67 lines of code)
    • 20 simple units (374 lines of code)
    • 248 very simple units (1,527 lines of code)
0% | 0% | 3% | 19% | 77%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 3% | 19% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/stepfunctions/steps0% | 0% | 4% | 22% | 72%
src/stepfunctions/workflow0% | 0% | 8% | 28% | 63%
src/stepfunctions/workflow/widgets0% | 0% | 0% | 11% | 88%
src/stepfunctions/template/pipeline0% | 0% | 0% | 9% | 90%
src/stepfunctions/inputs0% | 0% | 0% | 10% | 89%
src/stepfunctions/template0% | 0% | 0% | 0% | 100%
src/stepfunctions0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
doc0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in src/stepfunctions/steps/sagemaker.py
43 22 12
def __init__()
in src/stepfunctions/workflow/stepfunctions.py
24 15 12
def to_dict()
in src/stepfunctions/steps/states.py
11 10 1
def __init__()
in src/stepfunctions/steps/sagemaker.py
27 10 7
def __init__()
in src/stepfunctions/steps/sagemaker.py
26 10 13
def validate()
in src/stepfunctions/inputs/placeholders.py
15 9 2
def __init__()
in src/stepfunctions/steps/sagemaker.py
46 9 17
def __init__()
in src/stepfunctions/steps/choice_rule.py
13 9 4
def _get_resource()
in src/stepfunctions/workflow/widgets/events_table.py
12 9 3
def __init__()
in src/stepfunctions/steps/sagemaker.py
19 8 8
def merge_dicts()
in src/stepfunctions/steps/utils.py
15 8 2
def execute()
in src/stepfunctions/workflow/stepfunctions.py
26 8 3
def _replace_placeholders()
in src/stepfunctions/steps/states.py
15 7 2
def __init__()
in src/stepfunctions/steps/states.py
10 7 5
def _validate_next_step_params()
in src/stepfunctions/steps/states.py
10 7 3
def update()
in src/stepfunctions/workflow/stepfunctions.py
24 7 3
def next()
in src/stepfunctions/steps/states.py
10 6 2
def __init__()
in src/stepfunctions/steps/states.py
10 6 2
def visit()
in src/stepfunctions/steps/states.py
12 6 2
def execute()
in src/stepfunctions/template/pipeline/train.py
24 6 3