refactor: auto-derive pattern cap keys from href; move dumps to tests/fixtures

Remove key_fn from Capability — pattern cap keys are now always derived
automatically: strip digits from href segments, join with '_', append
'_' + desc.key. /door/cooler/0 + 'open' -> door_cooler_open.

DOOR_GENERIC entity key: 'open' (not 'door_open'). Remove _door_key helper.
Fridge registry: DOOR_FRIDGE/DOOR_FREEZER replaced by DOOR_GENERIC pattern cap.
Golden baseline: door_fridge_open -> door_cooler_open.

Move device dumps to tests/fixtures/dumps/ (tracked) so tests run in CI
without local-tools/ dependencies.
This commit is contained in:
Marc Billow committed 2026-06-30 16:33:36 -05:00
1 parent 1c4cb2e272
commit 27d6d09fd9
11 files changed
+37 -51

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ from samsung_appliance.registry.adapter import build_runtime_descriptor
('refrigerator', '10.0.0.254', 'refrigerator'),
])
def test_full_pipeline_v2(name, ip, expected_type_key):
with open(f'local-tools/dumps/{ip}.json') as f:
with open(f'tests/fixtures/dumps/{ip}.json') as f:
dump = json.load(f)
resources = _resources_from_dump(dump)