Code Metrics¶
Generated: 2026-07-21 22:04 UTC
Lines of Code¶
| Files | Code | Comment | Blank | Total | |
|---|---|---|---|---|---|
| Source | 26 | 2 754 | 676 | 208 | 3 638 |
| Tests | 25 | 3 617 | 414 | 455 | 4 486 |
| Combined | 51 | 6 371 | 1 090 | 663 | 8 124 |
- Comment/code ratio: 25%
- Test/source ratio: 131.3%
Source by module (click to expand)
| Module | Files | Code | Comment | Blank |
|---|---|---|---|---|
terok_util/ |
26 | 2 754 | 676 | 208 |
terok_util/matrix/ |
16 | 1 412 | 285 | 97 |
terok_util/matrix/containerfiles/ |
9 | 146 | 48 | 20 |
terok_util/matrix/containerfiles/nix/ |
1 | 74 | 0 | 9 |
terok_util/matrix/__init__.py |
— | 22 | 25 | 2 |
terok_util/matrix/catalog.py |
— | 73 | 19 | 9 |
terok_util/matrix/cli.py |
— | 391 | 35 | 15 |
terok_util/matrix/config.py |
— | 231 | 41 | 9 |
terok_util/matrix/contract.py |
— | 37 | 31 | 11 |
terok_util/matrix/inner.py |
— | 263 | 28 | 21 |
terok_util/matrix/runner.py |
— | 249 | 58 | 10 |
terok_util/__init__.py |
— | 42 | 71 | 12 |
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 |
— | 159 | 14 | 2 |
terok_util/logging.py |
— | 57 | 35 | 5 |
terok_util/paths.py |
— | 267 | 80 | 26 |
terok_util/podman.py |
— | 73 | 16 | 1 |
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: 97.6% (1178/1207 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: 131
- Median complexity: 2 · Average: 3.0 · Max: 28
- Within threshold (15): 98% (128/131)
0– 3 │ ██████████████████████████████ 95 (72.5%)
4– 6 │ ███████ 22 (16.8%)
7– 9 │ ██ 6 ( 4.6%)
10– 12 │ 1 ( 0.8%)
13– 15 │ █ 4 ( 3.1%) ◄ threshold
16– 18 │ 1 ( 0.8%)
19– 21 │ 0 ( 0.0%)
22– 25 │ 1 ( 0.8%)
26+ │ 1 ( 0.8%)
3 functions exceeding threshold:
| Complexity | Function | File |
|---|---|---|
| 28 | deep_merge |
src/terok_util/config_stack.py |
| 23 | _wire_command |
src/terok_util/cli_types.py |
| 18 | _phase_walk |
src/terok_util/matrix/inner.py |
Dead Code Analysis¶
No dead code found at 80% confidence threshold.
Docstring Coverage¶
- Needed: 165 - Found: 165 - 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.