aws-samples / smallmatter-package
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 173 units with 1,970 lines of code in units (73.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (458 lines of code)
    • 20 simple units (440 lines of code)
    • 144 very simple units (1,072 lines of code)
0% | 0% | 23% | 22% | 54%
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% | 23% | 22% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 41% | 31% | 26%
src/smallmatter0% | 0% | 11% | 19% | 69%
src/smallmatter/typecheck0% | 0% | 0% | 0% | 100%
notebooks/smproc-stopgap0% | 0% | 0% | 0% | 100%
src/smallmatter/aws_lambda0% | 0% | 0% | 0% | 100%
notebooks/smproc-stopgap/sourcedir0% | 0% | 0% | 0% | 100%
notebooks0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_versions()
in versioneer.py
57 22 1
def git_versions_from_keywords()
in src/smallmatter/_version.py
41 17 3
41 17 3
def git_pieces_from_vcs()
in src/smallmatter/_version.py
50 16 4
50 16 4
def get_cmdclass()
in versioneer.py
110 14 0
def do_setup()
in versioneer.py
64 14 0
def take_lowerable()
in src/smallmatter/common.py
14 12 2
def do_vcs_install()
in versioneer.py
31 11 3
def run_command()
in src/smallmatter/_version.py
31 10 6
def render()
in src/smallmatter/_version.py
32 10 2
def run_command()
in versioneer.py
31 10 6
def run_command()
in versioneer.py
35 10 6
def render()
in versioneer.py
27 10 2
def render()
in versioneer.py
32 10 2
def scan_setup_py()
in versioneer.py
34 9 0
def get_root()
in versioneer.py
26 8 0
def __new__()
in src/smallmatter/pathlib.py
13 7 3
def get_versions()
in src/smallmatter/_version.py
36 7 0
21 7 1