testsAndMisc/linux_configuration
Krzysztof kuhy Rudnicki b5dbe1e67a
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Python tests / test (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
usage_report: split _usage_report_parsing.py 425 -> 243 + 206
Lifts the atop subprocess machinery into _usage_report_atop.py: running
atop, streaming its parseable output, building/caching the atop_agg C
helper, and reading its TSV. What stays is record parsing, epoch windows
and per-day merging.

Verified by the 100%-coverage tests from the previous commit. An AST
comparison of all 16 functions against HEAD reports 16 identical, 0
mismatches.

_usage_report_render.py imported _run from the parsing module; it now
imports from the module that owns it. That is the same re-export barrel
the last split shipped and had to fix in a follow-up - caught in the same
commit this time. usage_report.py needed no edit at all.

Both modules hold 100% line+branch (94/28 and 130/34, 0 missed). 179
tests before and after; the five new test files collect 8+6+4+14+5 = 37,
which is last commit's 36 plus the one re-homed out of
test_usage_report_modes.py, where it referenced a constant that had
moved out from under it.

The two test files added last commit were themselves over cap (373, 272)
so they are split five ways here - the DropZone lesson from earlier
today, where a lint fix silently added an over-cap file.

Ran the program: a real report from today's logs, through the native
atop_agg path, which is precisely the code this commit moved.

Over-cap 39 -> 38.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-17 12:12:11 +02:00
..
.githooks Pin prettier, shfmt and zsh too, not just shellcheck 2026-08-04 21:07:49 +02:00
.github style: prettier formatting fixes 2026-05-15 01:15:52 +02:00
C/atop_agg atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
docs Apply prettier to two split prose files 2026-08-16 19:31:54 +02:00
dwm style: apply prettier formatting to evidence JSON and dwm/gaming READMEs 2026-06-14 07:22:04 +02:00
scripts usage_report: split _usage_report_parsing.py 425 -> 243 + 206 2026-08-17 12:12:11 +02:00
tests usage_report: split _usage_report_parsing.py 425 -> 243 + 206 2026-08-17 12:12:11 +02:00
zsh Split calc-live.zsh: extract the qalc coprocess 2026-08-16 22:12:32 +02:00
.gitignore linux_configuration: self-hosted dufs cloud storage + KeePass WebDAV auto-sync 2026-07-12 03:40:54 +02:00
install_core_system.sh remove(digital-wellbeing): delete unusable focus-mode daemon entirely 2026-07-19 13:15:04 +02:00
test_results.log Add 'linux_configuration/' from commit '0762e3d07b90bac9256eb272de10bf9f42878094' 2026-02-06 21:43:26 +01:00