Code Metrics¶
Generated: 2026-11-25 12:00 UTC
Lines of Code¶
| Files | Code | Comment | Blank | Total | |
|---|---|---|---|---|---|
| Source | 39 | 5 492 | 1 081 | 333 | 6 906 |
| Tests | 38 | 7 407 | 550 | 708 | 8 665 |
| Combined | 77 | 12 899 | 1 631 | 1 041 | 15 571 |
- Comment/code ratio: 20%
- Test/source ratio: 134.9%
Source by module (click to expand)
| Module | Files | Code | Comment | Blank |
|---|---|---|---|---|
terok_util/ |
39 | 5 492 | 1 081 | 333 |
terok_util/matrix/ |
23 | 2 582 | 452 | 152 |
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/_files.py |
— | 30 | 10 | 8 |
terok_util/matrix/catalog.py |
— | 117 | 77 | 21 |
terok_util/matrix/cli.py |
— | 631 | 23 | 14 |
terok_util/matrix/config.py |
— | 279 | 57 | 9 |
terok_util/matrix/contract.py |
— | 47 | 21 | 7 |
terok_util/matrix/inner.py |
— | 551 | 30 | 28 |
terok_util/matrix/jobserver.py |
— | 151 | 10 | 4 |
terok_util/matrix/report.py |
— | 81 | 6 | 6 |
terok_util/matrix/runner.py |
— | 424 | 126 | 20 |
terok_util/__init__.py |
— | 178 | 28 | 1 |
terok_util/cli_types.py |
— | 489 | 65 | 16 |
terok_util/config_stack.py |
— | 128 | 81 | 33 |
terok_util/fs.py |
— | 75 | 47 | 10 |
terok_util/hardening.py |
— | 391 | 55 | 21 |
terok_util/host_tools.py |
— | 27 | 20 | 4 |
terok_util/journal.py |
— | 125 | 2 | 3 |
terok_util/logging.py |
— | 193 | 36 | 2 |
terok_util/matrix_skip_plugin.py |
— | 133 | 69 | 3 |
terok_util/output_capture.py |
— | 211 | 36 | 7 |
terok_util/paths.py |
— | 288 | 73 | 32 |
terok_util/podman.py |
— | 100 | 14 | 5 |
terok_util/security.py |
— | 74 | 29 | 9 |
terok_util/setup.py |
— | 279 | 27 | 16 |
terok_util/untrusted_fs.py |
— | 139 | 43 | 17 |
terok_util/yaml.py |
— | 80 | 4 | 2 |
Architecture¶
Module Dependency Graph¶
graph TD
terok_util.setup --> terok_util.paths
terok_util.setup --> terok_util.fs
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.untrusted_fs
terok_util.config_stack
terok_util.security
Module Boundaries¶
9 modules, 4 dependency edges — all boundaries validated.
Module Summary¶
9 modules (click to expand)
| Module | Deps | Description |
|---|---|---|
terok_util.host_tools |
0 | |
terok_util.setup |
2 | |
terok_util.cli_types |
0 | every sibling that builds a CLI tree. |
terok_util.fs |
0 | Atomic-write helpers + filesystem invariants. |
terok_util.untrusted_fs |
0 | |
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.9% (2424/2477 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: 259
- Median complexity: 1 · Average: 2.7 · Max: 24
- Within threshold (15): 99% (256/259)
0– 3 │ ██████████████████████████████ 193 (74.5%)
4– 6 │ █████ 33 (12.7%)
7– 9 │ ███ 19 ( 7.3%)
10– 12 │ █ 6 ( 2.3%)
13– 15 │ █ 5 ( 1.9%) ◄ threshold
16– 18 │ 0 ( 0.0%)
19– 21 │ 1 ( 0.4%)
22– 25 │ 2 ( 0.8%)
3 functions exceeding threshold:
| Complexity | Function | File |
|---|---|---|
| 24 | deep_merge |
src/terok_util/config_stack.py |
| 23 | _wire_command |
src/terok_util/cli_types.py |
| 20 | _walk_matrix |
src/terok_util/matrix/cli.py |
Dead Code Analysis¶
No dead code found at 80% confidence threshold.
Docstring Coverage¶
- Needed: 321 - Found: 321 - 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.