mirror of
https://github.com/deepmodeling/Uni-Lab-OS
synced 2026-03-28 19:06:49 +00:00
Register PRCXI9300ModuleSite/FunctionalModule for PLR deserialization
Added PRCXI9300ModuleSite and PRCXI9300FunctionalModule to the PLR class registration in plr_additional_res_reg.py so find_subclass can locate them during deserialization of cached cloud data. Also added "module" and "carrier" to replace_plr_type and TYPE_MAP in resource_tracker.py to suppress unknown type warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,9 @@ def register():
|
|||||||
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300TipRack
|
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300TipRack
|
||||||
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300Trash
|
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300Trash
|
||||||
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300TubeRack
|
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300TubeRack
|
||||||
|
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300ModuleSite
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from unilabos.devices.liquid_handling.prcxi.prcxi_modules import PRCXI9300FunctionalModule
|
||||||
# noinspection PyUnresolvedReferences
|
# noinspection PyUnresolvedReferences
|
||||||
from unilabos.devices.workstation.workstation_base import WorkStationContainer
|
from unilabos.devices.workstation.workstation_base import WorkStationContainer
|
||||||
|
|
||||||
|
|||||||
@@ -459,6 +459,8 @@ class ResourceTreeSet(object):
|
|||||||
"reagent_bottle": "reagent_bottle",
|
"reagent_bottle": "reagent_bottle",
|
||||||
"flask": "flask",
|
"flask": "flask",
|
||||||
"beaker": "beaker",
|
"beaker": "beaker",
|
||||||
|
"module": "module",
|
||||||
|
"carrier": "carrier",
|
||||||
}
|
}
|
||||||
if source in replace_info:
|
if source in replace_info:
|
||||||
return replace_info[source]
|
return replace_info[source]
|
||||||
@@ -596,6 +598,8 @@ class ResourceTreeSet(object):
|
|||||||
"deck": "Deck",
|
"deck": "Deck",
|
||||||
"container": "RegularContainer",
|
"container": "RegularContainer",
|
||||||
"tip_spot": "TipSpot",
|
"tip_spot": "TipSpot",
|
||||||
|
"module": "PRCXI9300ModuleSite",
|
||||||
|
"carrier": "ItemizedCarrier",
|
||||||
}
|
}
|
||||||
|
|
||||||
def collect_node_data(node: ResourceDictInstance, name_to_uuid: dict, all_states: dict, name_to_extra: dict):
|
def collect_node_data(node: ResourceDictInstance, name_to_uuid: dict, all_states: dict, name_to_extra: dict):
|
||||||
@@ -958,6 +962,17 @@ class ResourceTreeSet(object):
|
|||||||
f"从远端同步了 {added_count} 个物料子树"
|
f"从远端同步了 {added_count} 个物料子树"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
# 二级是物料
|
||||||
|
if remote_child_name not in local_children_map:
|
||||||
|
# 本地不存在该物料,直接引入
|
||||||
|
remote_child.res_content.parent = local_device.res_content
|
||||||
|
local_device.children.append(remote_child)
|
||||||
|
local_children_map[remote_child_name] = remote_child
|
||||||
|
logger.info(
|
||||||
|
f"物料 '{remote_root_id}/{remote_child_name}': "
|
||||||
|
f"从远端同步了整个子树"
|
||||||
|
)
|
||||||
|
continue
|
||||||
# 二级物料已存在,比较三级子节点是否缺失
|
# 二级物料已存在,比较三级子节点是否缺失
|
||||||
local_material = local_children_map[remote_child_name]
|
local_material = local_children_map[remote_child_name]
|
||||||
local_material_children_map = {child.res_content.name: child for child in
|
local_material_children_map = {child.res_content.name: child for child in
|
||||||
|
|||||||
Reference in New Issue
Block a user