aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/tests/test_desktop.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-27 13:57:33 -0400
committerCraig Jennings <c@cjennings.net>2026-06-27 13:57:33 -0400
commita2fd2eed941838320326189b0a3fb5dbc1af59b2 (patch)
tree878a6093b9ecf36ffaec3072b8949b6da5d5d291 /scripts/testing/tests/test_desktop.py
parentba07886525acfb78999d98c4c1a06bc4c08e8d95 (diff)
downloadarchsetup-a2fd2eed941838320326189b0a3fb5dbc1af59b2.tar.gz
archsetup-a2fd2eed941838320326189b0a3fb5dbc1af59b2.zip
refactor: decompose installer step functions into named sub-steps
The big step functions mixed many concerns in one body, with essential_services the worst at 442 lines spanning randomness, networking, SSH, firewall, service discovery, scheduling, and a 177-line filesystem- branched snapshot block. I split five of them into thin orchestrators that call named sub-functions, one per concern: - essential_services into 11 sub-steps; the snapshot block further splits into configure_zfs_snapshots / configure_btrfs_snapshots behind a dispatcher. - prerequisites into bootstrap_pacman_keyring, install_required_software, configure_build_environment, configure_package_mirrors. - developer_workstation into per-category installers. - boot_ux into one function per hardware-conditional concern (efi perms, nvme module, initramfs hook, encrypted autologin, TLP, firmware trim, GRUB). - user_customizations into clone, stow, waybar prune, desktop caches, dconf, finalize, directory creation. Each sub-function body is a verbatim slice of the original (no re-indentation, so heredoc bodies stay byte-identical). I verified each extraction by asserting the slices, concatenated in call order, reproduce the original body exactly, so no line is lost or reordered. bash -n is clean, the unit suite stays green, and shellcheck gains no real findings. The SC2329 "never invoked" notes on the new functions are the same indirect-dispatch false positive every step function already carries. The flat installers (desktop_environment, supplemental_software) and the linear preflight_checks are left whole: their length is a sequence of independent installs or checks, not mixed concerns, so splitting would scatter a linear read behind indirection.
Diffstat (limited to 'scripts/testing/tests/test_desktop.py')
0 files changed, 0 insertions, 0 deletions