feat: Steam game & library detection (M6) — 0.8.0
The first slice of M6 (gaming-environment checks): detect a user's Steam libraries and the games installed in each — also the D12 "pick a game" foundation. - core/steam.py: multi-install/library discovery (libraryfolders.vdf, symlink dedupe, native/Flatpak/Snap), appmanifest_*.acf scan with runtime/Proton/ redist filtering, scan cache + new-game diff. Stdlib only. VDF keys read case-insensitively (e.g. lastupdated vs SizeOnDisk). - Libraries are opt-in (config steam_libraries); the flat TOML writer now emits list/array values. - GUI Games page: library checkboxes with per-library counts, game list, background rescan on every launch, NEW badge + sidebar count for games installed since the last scan (acknowledged when viewed). - CLI: rigdoctor games / games libraries [--enable|--disable|--all|--json] (headless-complete, D17). - Tests for VDF parse, scan, tool filter, cache diff, config list round-trip. - Docs (MODULES/ROADMAP) updated; version 0.7.3 -> 0.8.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,16 @@ class ConfigTests(unittest.TestCase):
|
||||
self.assertEqual(loaded["gpu_temp_alert"], 88.0)
|
||||
self.assertEqual(loaded["update_check_minutes"], 5)
|
||||
|
||||
def test_list_value_round_trip(self):
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
cf = Path(d) / "config.toml"
|
||||
with mock.patch.object(config, "CONFIG_FILE", cf), mock.patch.object(config, "CONFIG_DIR", Path(d)):
|
||||
paths = ["/home/u/.local/share/Steam", "/mnt/games/SteamLibrary"]
|
||||
config.update_config(steam_libraries=paths)
|
||||
self.assertEqual(config.load_config()["steam_libraries"], paths)
|
||||
config.update_config(steam_libraries=[])
|
||||
self.assertEqual(config.load_config()["steam_libraries"], [])
|
||||
|
||||
def test_update_config_merges_and_keeps_defaults(self):
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
cf = Path(d) / "config.toml"
|
||||
|
||||
Reference in New Issue
Block a user