Code Metrics¶
Generated: 2026-10-09 22:50 UTC
Lines of Code¶
| Files | Code | Comment | Blank | Total | |
|---|---|---|---|---|---|
| Source | 37 | 5 028 | 967 | 293 | 6 288 |
| Tests | 35 | 6 185 | 545 | 684 | 7 414 |
| Combined | 72 | 11 213 | 1 512 | 977 | 13 702 |
- Comment/code ratio: 19%
- Test/source ratio: 123.0%
Source by module (click to expand)
| Module | Files | Code | Comment | Blank |
|---|---|---|---|---|
terok_util/ |
37 | 5 028 | 967 | 293 |
terok_util/matrix/ |
22 | 2 480 | 434 | 149 |
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 |
— | 616 | 36 | 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 |
— | 151 | 10 | 4 |
terok_util/matrix/report.py |
— | 81 | 6 | 6 |
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 |
— | 397 | 55 | 21 |
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.4% (2109/2166 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: 231
- Median complexity: 1 · Average: 2.9 · Max: 28
- Within threshold (15): 98% (227/231)
0– 3 │ ██████████████████████████████ 170 (73.6%)
4– 6 │ █████ 30 (13.0%)
7– 9 │ ███ 17 ( 7.4%)
10– 12 │ █ 4 ( 1.7%)
13– 15 │ █ 6 ( 2.6%) ◄ 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: 289 - Found: 289 - 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.