Skip to content

Commit 8fa3407

Browse files
committed
Add result schema and add TypedDict conversion.
1 parent d328282 commit 8fa3407

File tree

10 files changed

+879
-94
lines changed

10 files changed

+879
-94
lines changed

unilabos/devices/workstation/bioyond_studio/dispensing_station.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import time
44
from typing import Optional, Dict, Any, List
5+
from typing_extensions import TypedDict
56
import requests
67
from unilabos.devices.workstation.bioyond_studio.config import API_CONFIG
78

@@ -13,6 +14,14 @@
1314
from pathlib import Path
1415
import importlib
1516

17+
class ComputeExperimentDesignReturn(TypedDict):
18+
solutions: list
19+
titration: dict
20+
solvents: dict
21+
feeding_order: list
22+
return_info: str
23+
24+
1625
class BioyondDispensingStation(BioyondWorkstation):
1726
def __init__(
1827
self,
@@ -102,7 +111,7 @@ def compute_experiment_design(
102111
wt_percent: str = "0.25",
103112
m_tot: str = "70",
104113
titration_percent: str = "0.03",
105-
) -> dict:
114+
) -> ComputeExperimentDesignReturn:
106115
try:
107116
if isinstance(ratio, str):
108117
try:

unilabos/registry/devices/bioyond.yaml

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,96 @@ workstation.bioyond_dispensing_station:
8383
title: batch_create_diamine_solution_tasks参数
8484
type: object
8585
type: UniLabJsonCommand
86+
auto-brief_step_parameters:
87+
feedback: {}
88+
goal: {}
89+
goal_default:
90+
data: null
91+
handles: {}
92+
placeholder_keys: {}
93+
result: {}
94+
schema:
95+
description: ''
96+
properties:
97+
feedback: {}
98+
goal:
99+
properties:
100+
data:
101+
type: object
102+
required:
103+
- data
104+
type: object
105+
result: {}
106+
required:
107+
- goal
108+
title: brief_step_parameters参数
109+
type: object
110+
type: UniLabJsonCommand
111+
auto-compute_experiment_design:
112+
feedback: {}
113+
goal: {}
114+
goal_default:
115+
m_tot: '70'
116+
ratio: null
117+
titration_percent: '0.03'
118+
wt_percent: '0.25'
119+
handles: {}
120+
placeholder_keys: {}
121+
result: {}
122+
schema:
123+
description: ''
124+
properties:
125+
feedback: {}
126+
goal:
127+
properties:
128+
m_tot:
129+
default: '70'
130+
type: string
131+
ratio:
132+
type: object
133+
titration_percent:
134+
default: '0.03'
135+
type: string
136+
wt_percent:
137+
default: '0.25'
138+
type: string
139+
required:
140+
- ratio
141+
type: object
142+
result:
143+
properties:
144+
feeding_order:
145+
items: {}
146+
title: Feeding Order
147+
type: array
148+
return_info:
149+
title: Return Info
150+
type: string
151+
solutions:
152+
items: {}
153+
title: Solutions
154+
type: array
155+
solvents:
156+
additionalProperties: true
157+
title: Solvents
158+
type: object
159+
titration:
160+
additionalProperties: true
161+
title: Titration
162+
type: object
163+
required:
164+
- solutions
165+
- titration
166+
- solvents
167+
- feeding_order
168+
- return_info
169+
title: ComputeExperimentDesignReturn
170+
type: object
171+
required:
172+
- goal
173+
title: compute_experiment_design参数
174+
type: object
175+
type: UniLabJsonCommand
86176
auto-process_order_finish_report:
87177
feedback: {}
88178
goal: {}
@@ -112,6 +202,85 @@ workstation.bioyond_dispensing_station:
112202
title: process_order_finish_report参数
113203
type: object
114204
type: UniLabJsonCommand
205+
auto-project_order_report:
206+
feedback: {}
207+
goal: {}
208+
goal_default:
209+
order_id: null
210+
handles: {}
211+
placeholder_keys: {}
212+
result: {}
213+
schema:
214+
description: ''
215+
properties:
216+
feedback: {}
217+
goal:
218+
properties:
219+
order_id:
220+
type: string
221+
required:
222+
- order_id
223+
type: object
224+
result: {}
225+
required:
226+
- goal
227+
title: project_order_report参数
228+
type: object
229+
type: UniLabJsonCommand
230+
auto-query_resource_by_name:
231+
feedback: {}
232+
goal: {}
233+
goal_default:
234+
material_name: null
235+
handles: {}
236+
placeholder_keys: {}
237+
result: {}
238+
schema:
239+
description: ''
240+
properties:
241+
feedback: {}
242+
goal:
243+
properties:
244+
material_name:
245+
type: string
246+
required:
247+
- material_name
248+
type: object
249+
result: {}
250+
required:
251+
- goal
252+
title: query_resource_by_name参数
253+
type: object
254+
type: UniLabJsonCommand
255+
auto-transfer_materials_to_reaction_station:
256+
feedback: {}
257+
goal: {}
258+
goal_default:
259+
target_device_id: null
260+
transfer_groups: null
261+
handles: {}
262+
placeholder_keys: {}
263+
result: {}
264+
schema:
265+
description: ''
266+
properties:
267+
feedback: {}
268+
goal:
269+
properties:
270+
target_device_id:
271+
type: string
272+
transfer_groups:
273+
type: array
274+
required:
275+
- target_device_id
276+
- transfer_groups
277+
type: object
278+
result: {}
279+
required:
280+
- goal
281+
title: transfer_materials_to_reaction_station参数
282+
type: object
283+
type: UniLabJsonCommand
115284
auto-wait_for_multiple_orders_and_get_reports:
116285
feedback: {}
117286
goal: {}
@@ -144,6 +313,31 @@ workstation.bioyond_dispensing_station:
144313
title: wait_for_multiple_orders_and_get_reports参数
145314
type: object
146315
type: UniLabJsonCommand
316+
auto-workflow_sample_locations:
317+
feedback: {}
318+
goal: {}
319+
goal_default:
320+
workflow_id: null
321+
handles: {}
322+
placeholder_keys: {}
323+
result: {}
324+
schema:
325+
description: ''
326+
properties:
327+
feedback: {}
328+
goal:
329+
properties:
330+
workflow_id:
331+
type: string
332+
required:
333+
- workflow_id
334+
type: object
335+
result: {}
336+
required:
337+
- goal
338+
title: workflow_sample_locations参数
339+
type: object
340+
type: UniLabJsonCommand
147341
create_90_10_vial_feeding_task:
148342
feedback: {}
149343
goal:

0 commit comments

Comments
 (0)