Skip to content

Code Metrics

Generated: 2026-06-09 06:46 UTC


Lines of Code

Files Code Comment Blank Total
Source 9 916 356 103 1 375
Tests 10 1 393 173 213 1 779
Combined 19 2 309 529 316 3 154
  • Comment/code ratio: 39%
  • Test/source ratio: 152.1%
Source by module (click to expand)
Module Files Code Comment Blank
terok_util/ 9 916 356 103
terok_util/__init__.py 37 58 11
terok_util/cli_types.py 333 63 12
terok_util/config_stack.py 128 81 33
terok_util/fs.py 59 6 7
terok_util/logging.py 57 35 5
terok_util/paths.py 227 76 19
terok_util/podman.py 7 14 7
terok_util/security.py 13 19 7
terok_util/yaml.py 55 4 2

Architecture

Module Dependency Graph

graph TD
    terok_util.paths --> terok_util.config_stack
    terok_util.cli_types
    terok_util.fs
    terok_util.config_stack
    terok_util.security
    terok_util.podman

Module Boundaries

6 modules, 1 dependency edges — all boundaries validated.

Module Summary

6 modules (click to expand)
Module Deps Description
terok_util.cli_types 0 every sibling that builds a CLI tree.
terok_util.fs 0 Atomic-write helpers + filesystem invariants.
terok_util.paths 1 env var on every shell).
terok_util.config_stack 0 Imports ruamel.yaml for round-trip YAML.
terok_util.security 0 Untrusted-string sanitisation for terminal output (CWE-150).
terok_util.podman 0 Rootless podman --userns=keep-id:uid=1000,gid=1000 builder.

Test Coverage

Overall line coverage: 94.8% (491/518 statements).

Each rectangle is a source file. Area is proportional to the number of statements; colour encodes the coverage percentage (green = fully covered, red = uncovered). Files are grouped by the first 3 directory levels.

Cognitive Complexity

Threshold: 15 (functions above this are listed below)

  • Functions analyzed: 56
  • Median complexity: 1.0 · Average: 3.2 · Max: 23
  • Within threshold (15): 95% (53/56)
    0–  3 │ ██████████████████████████████  36 (64.3%)
    4–  6 │ ████████████                    14 (25.0%)
    7–  9 │ ██                               2 ( 3.6%)
   10– 12 │ █                                1 ( 1.8%)
   13– 15 │                                  0 ( 0.0%) ◄ threshold
   16– 18 │ █                                1 ( 1.8%)
   19– 21 │ █                                1 ( 1.8%)
   22– 25 │ █                                1 ( 1.8%)

3 functions exceeding threshold:

Complexity Function File
23 deep_merge src/terok_util/config_stack.py
21 _wire_command src/terok_util/cli_types.py
16 host_uid src/terok_util/paths.py

Dead Code Analysis

No dead code found at 80% confidence threshold.

Docstring Coverage

  • Needed: 72 - Found: 72 - Missing: 0
  • Total coverage: 100.0% - Grade: AMAZING! Your docstrings are truly a wonder to behold!

Generated by scc, complexipy, vulture, tach, and docstr-coverage.