Skip to content

Code Metrics

Generated: 2026-09-29 06:09 UTC


Lines of Code

Files Code Comment Blank Total
Source 36 4 844 962 285 6 091
Tests 34 6 013 535 656 7 204
Combined 70 10 857 1 497 941 13 295
  • Comment/code ratio: 20%
  • Test/source ratio: 124.1%
Source by module (click to expand)
Module Files Code Comment Blank
terok_util/ 36 4 844 962 285
terok_util/matrix/ 21 2 328 431 143
terok_util/matrix/containerfiles/ 13 249 67 33
terok_util/matrix/containerfiles/nix/ 1 74 0 9
terok_util/matrix/__init__.py — 22 25 2
terok_util/matrix/catalog.py — 116 77 21
terok_util/matrix/cli.py — 549 39 20
terok_util/matrix/config.py — 238 43 9
terok_util/matrix/contract.py — 47 21 7
terok_util/matrix/inner.py — 550 30 28
terok_util/matrix/jobserver.py — 147 10 4
terok_util/matrix/runner.py — 410 119 19
terok_util/__init__.py — 150 27 1
terok_util/cli_types.py — 489 65 16
terok_util/config_stack.py — 128 81 33
terok_util/fs.py — 59 6 7
terok_util/hardening.py — 365 53 19
terok_util/host_tools.py — 27 20 4
terok_util/journal.py — 125 2 3
terok_util/logging.py — 193 35 2
terok_util/matrix_skip_plugin.py — 133 69 3
terok_util/output_capture.py — 211 35 7
terok_util/paths.py — 267 80 26
terok_util/podman.py — 79 17 1
terok_util/security.py — 13 19 7
terok_util/setup.py — 222 18 11
terok_util/yaml.py — 55 4 2

Architecture

Module Dependency Graph

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

Module Boundaries

8 modules, 3 dependency edges — all boundaries validated.

Module Summary

8 modules (click to expand)
Module Deps Description
terok_util.host_tools 0
terok_util.setup 1
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 1 Rootless podman --userns=keep-id:uid=1000,gid=1000 builder.

Test Coverage

Overall line coverage: 97.3% (2007/2062 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: 225
  • Median complexity: 1 · Average: 2.8 · Max: 28
  • Within threshold (15): 98% (221/225)
    0–  3 │ ██████████████████████████████ 166 (73.8%)
    4–  6 │ ██████                          31 (13.8%)
    7–  9 │ ███                             16 ( 7.1%)
   10– 12 │ █                                3 ( 1.3%)
   13– 15 │ █                                5 ( 2.2%) ◄ threshold
   16– 18 │                                  1 ( 0.4%)
   19– 21 │                                  1 ( 0.4%)
   22– 25 │                                  1 ( 0.4%)
   26+    │                                  1 ( 0.4%)

4 functions exceeding threshold:

Complexity Function File
28 deep_merge src/terok_util/config_stack.py
23 _wire_command src/terok_util/cli_types.py
19 _walk_matrix src/terok_util/matrix/cli.py
18 _phase_walk src/terok_util/matrix/inner.py

Dead Code Analysis

No dead code found at 80% confidence threshold.

Docstring Coverage

  • Needed: 280 - Found: 280 - 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.