mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-04 13:25:13 +00:00
Fix/resource UUID and doc fix (#109)
* Fix ResourceTreeSet load error * Raise error when using unsupported type to create ResourceTreeSet * Fix children key error * Fix children key error * Fix workstation resource not tracking * Fix workstation deck & children resource dupe * Fix workstation deck & children resource dupe * Fix multiple resource error * Fix resource tree update * Fix resource tree update * Force confirm uuid * Tip more error log * Refactor Bioyond workstation and experiment workflow (#105) Refactored the Bioyond workstation classes to improve parameter handling and workflow management. Updated experiment.py to use BioyondReactionStation with deck and material mappings, and enhanced workflow step parameter mapping and execution logic. Adjusted JSON experiment configs, improved workflow sequence handling, and added UUID assignment to PLR materials. Removed unused station_config and material cache logic, and added detailed docstrings and debug output for workflow methods. * Fix resource get. Fix resource parent not found. Mapping uuid for all resources. * mount parent uuid * Add logging configuration based on BasicConfig in main function * fix workstation node error * fix workstation node error * Update boot example * temp fix for resource get * temp fix for resource get * provide error info when cant find plr type * pack repo info * fix to plr type error * fix to plr type error * Update regular container method * support no size init * fix comprehensive_station.json * fix comprehensive_station.json * fix type conversion * fix state loading for regular container * Update deploy-docs.yml * Update deploy-docs.yml --------- Co-authored-by: ZiWei <131428629+ZiWei09@users.noreply.github.com>
This commit is contained in:
@@ -129,7 +129,6 @@ class BioyondWorkstation(WorkstationBase):
|
||||
self,
|
||||
bioyond_config: Optional[Dict[str, Any]] = None,
|
||||
deck: Optional[Any] = None,
|
||||
station_config: Optional[Dict[str, Any]] = None,
|
||||
*args,
|
||||
**kwargs,
|
||||
):
|
||||
@@ -152,9 +151,6 @@ class BioyondWorkstation(WorkstationBase):
|
||||
if isinstance(resource, WareHouse):
|
||||
self.deck.warehouses[resource.name] = resource
|
||||
|
||||
# 配置站点类型
|
||||
self._configure_station_type(station_config)
|
||||
|
||||
# 创建通信模块
|
||||
self._create_communication_module(bioyond_config)
|
||||
self.resource_synchronizer = BioyondResourceSynchronizer(self)
|
||||
@@ -167,8 +163,6 @@ class BioyondWorkstation(WorkstationBase):
|
||||
self.workflow_mappings = {}
|
||||
self.workflow_sequence = []
|
||||
self.pending_task_params = []
|
||||
self.material_cache = {}
|
||||
self._load_material_cache()
|
||||
|
||||
if "workflow_mappings" in bioyond_config:
|
||||
self._set_workflow_mappings(bioyond_config["workflow_mappings"])
|
||||
@@ -325,10 +319,22 @@ class BioyondWorkstation(WorkstationBase):
|
||||
}
|
||||
|
||||
def append_to_workflow_sequence(self, web_workflow_name: str) -> bool:
|
||||
workflow_id = self._get_workflow(web_workflow_name)
|
||||
# 检查是否为JSON格式的字符串
|
||||
actual_workflow_name = web_workflow_name
|
||||
if web_workflow_name.startswith('{') and web_workflow_name.endswith('}'):
|
||||
try:
|
||||
data = json.loads(web_workflow_name)
|
||||
actual_workflow_name = data.get("web_workflow_name", web_workflow_name)
|
||||
print(f"解析JSON格式工作流名称: {web_workflow_name} -> {actual_workflow_name}")
|
||||
except json.JSONDecodeError:
|
||||
print(f"JSON解析失败,使用原始字符串: {web_workflow_name}")
|
||||
|
||||
workflow_id = self._get_workflow(actual_workflow_name)
|
||||
if workflow_id:
|
||||
self.workflow_sequence.append(workflow_id)
|
||||
print(f"添加工作流到执行顺序: {web_workflow_name} -> {workflow_id}")
|
||||
print(f"添加工作流到执行顺序: {actual_workflow_name} -> {workflow_id}")
|
||||
return True
|
||||
return False
|
||||
|
||||
def set_workflow_sequence(self, json_str: str) -> List[str]:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user