From 4eaa1cd213165d80a9ceab421ac79a1d8f071b1a Mon Sep 17 00:00:00 2001 From: Forest Savage <96553407+forest-savage1234@users.noreply.github.com> Date: Sun, 23 Aug 2026 13:01:15 -0800 Subject: [PATCH 1/2] fix: type the example.py camera node as Device Cites #43. Does not close it. The rest of the generic-ObservableObject work stays open. Adds class Device(ObservableObject) next to File (same four lines, @type uco-observable:Device) and changes the named camera constructor only. device_phone_object and the other ObservableObject() calls stay. Out of scope: Mapping-Python #50 / #18, rewriting every other ObservableObject() in example.py, a class generator, UCO #363, dropping or rewriting Bundle. Identity if committed: Forest Savage Do not push from this packet. --- case_mapping/uco/observable.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/case_mapping/uco/observable.py b/case_mapping/uco/observable.py index 0decb52..84e7e8c 100644 --- a/case_mapping/uco/observable.py +++ b/case_mapping/uco/observable.py @@ -1105,6 +1105,12 @@ def __init__( self._bool_vars(**{"uco-observable:isSecure": is_secure}) +class Device(ObservableObject): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self["@type"] = "uco-observable:Device" + + class File(ObservableObject): def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) From 5bf5c74c63a4cfd84f1b0fc91c6f5caa50a4426b Mon Sep 17 00:00:00 2001 From: Forest Savage <96553407+forest-savage1234@users.noreply.github.com> Date: Sun, 23 Aug 2026 13:01:17 -0800 Subject: [PATCH 2/2] fix: type the example.py camera node as Device Cites #43. Does not close it. The rest of the generic-ObservableObject work stays open. Adds class Device(ObservableObject) next to File (same four lines, @type uco-observable:Device) and changes the named camera constructor only. device_phone_object and the other ObservableObject() calls stay. Out of scope: Mapping-Python #50 / #18, rewriting every other ObservableObject() in example.py, a class generator, UCO #363, dropping or rewriting Bundle. Identity if committed: Forest Savage Do not push from this packet. --- example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example.py b/example.py index 4fb28c2..90c9f50 100755 --- a/example.py +++ b/example.py @@ -54,7 +54,7 @@ def _next_timestamp() -> datetime: ############################################ # A DeviceFacet and a OperatingSystemFacet # ############################################ -device_camera = uco.observable.ObservableObject() +device_camera = uco.observable.Device() manufacturer_nikon = uco.identity.Organization(name="Nikon") bundle.append_to_uco_object(manufacturer_nikon) device1 = uco.observable.DeviceFacet(manufacturer=manufacturer_nikon, model="D750")