-
Notifications
You must be signed in to change notification settings - Fork 38
宜宾奔耀工站deck前端by_Xinyu #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
宜宾奔耀工站deck前端by_Xinyu #115
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| from os import name | ||
| from pylabrobot.resources import Deck, Coordinate, Rotation | ||
|
|
||
| from unilabos.resources.bioyond.warehouses import bioyond_warehouse_1x4x4, bioyond_warehouse_1x4x2, bioyond_warehouse_liquid_and_lid_handling | ||
| from unilabos.resources.bioyond.warehouses import bioyond_warehouse_1x4x4, bioyond_warehouse_1x4x2, bioyond_warehouse_liquid_and_lid_handling, bioyond_warehouse_1x2x2, bioyond_warehouse_1x3x3, bioyond_warehouse_10x1x1, bioyond_warehouse_3x3x1, bioyond_warehouse_3x3x1_2, bioyond_warehouse_5x1x1 | ||
|
|
||
|
|
||
| class BIOYOND_PolymerReactionStation_Deck(Deck): | ||
|
|
@@ -66,3 +67,60 @@ def setup(self) -> None: | |
|
|
||
| for warehouse_name, warehouse in self.warehouses.items(): | ||
| self.assign_child_resource(warehouse, location=self.warehouse_locations[warehouse_name]) | ||
|
|
||
| class BIOYOND_YB_Deck(Deck): | ||
| def __init__( | ||
| self, | ||
| name: str = "YB_Deck", | ||
| size_x: float = 4150, | ||
| size_y: float = 1400.0, | ||
| size_z: float = 2670.0, | ||
| category: str = "deck", | ||
| setup: bool = False | ||
| ) -> None: | ||
| super().__init__(name=name, size_x=4150.0, size_y=1400.0, size_z=2670.0) | ||
| if setup: | ||
| self.setup() | ||
|
|
||
| def setup(self) -> None: | ||
| # 添加仓库 | ||
| self.warehouses = { | ||
| "321窗口": bioyond_warehouse_1x2x2("321窗口"), | ||
| "43窗口": bioyond_warehouse_1x2x2("43窗口"), | ||
| "手动传递窗左": bioyond_warehouse_1x3x3("手动传递窗左"), | ||
| "手动传递窗右": bioyond_warehouse_1x3x3("手动传递窗右"), | ||
| "加样头堆栈左": bioyond_warehouse_10x1x1("加样头堆栈左"), | ||
| "加样头堆栈右": bioyond_warehouse_10x1x1("加样头堆栈右"), | ||
|
|
||
| "15ml配液堆栈左": bioyond_warehouse_3x3x1("15ml配液堆栈左"), | ||
| "母液加样右": bioyond_warehouse_3x3x1_2("母液加样右"), | ||
| "大瓶母液堆栈左": bioyond_warehouse_5x1x1("大瓶母液堆栈左"), | ||
| "大瓶母液堆栈右": bioyond_warehouse_5x1x1("大瓶母液堆栈右"), | ||
| } | ||
| # warehouse 的位置 | ||
| self.warehouse_locations = { | ||
| "321窗口": Coordinate(-150.0, 158.0, 0.0), | ||
| "43窗口": Coordinate(4160.0, 158.0, 0.0), | ||
| "手动传递窗左": Coordinate(-150.0, 877.0, 0.0), | ||
| "手动传递窗右": Coordinate(4160.0, 877.0, 0.0), | ||
| "加样头堆栈左": Coordinate(385.0, 1300.0, 0.0), | ||
| "加样头堆栈右": Coordinate(2187.0, 1300.0, 0.0), | ||
|
|
||
| "15ml配液堆栈左": Coordinate(749.0, 355.0, 0.0), | ||
| "母液加样右": Coordinate(2152.0, 333.0, 0.0), | ||
| "大瓶母液堆栈左": Coordinate(1164.0, 676.0, 0.0), | ||
| "大瓶母液堆栈右": Coordinate(2717.0, 676.0, 0.0), | ||
| } | ||
|
|
||
| for warehouse_name, warehouse in self.warehouses.items(): | ||
| self.assign_child_resource(warehouse, location=self.warehouse_locations[warehouse_name]) | ||
|
|
||
| def YB_Deck(name: str) -> Deck: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: The YB_Deck factory function calls setup() after instantiation, which may be redundant. Consider instantiating BIOYOND_YB_Deck with setup=True to avoid redundant setup() calls. Suggested implementation: def YB_Deck(name: str) -> Deck:
by = BIOYOND_YB_Deck(name=name, setup=True)
return byMake sure that the |
||
| by=BIOYOND_YB_Deck(name=name) | ||
| by.setup() | ||
| return by | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,15 +5,15 @@ def bioyond_warehouse_1x4x4(name: str) -> WareHouse: | |||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=4, | ||||||||||||||
| num_items_x=1, | ||||||||||||||
| num_items_y=4, | ||||||||||||||
| num_items_z=1, | ||||||||||||||
| num_items_z=4, | ||||||||||||||
| dx=10.0, | ||||||||||||||
| dy=10.0, | ||||||||||||||
| dz=10.0, | ||||||||||||||
| item_dx=147.0, | ||||||||||||||
| item_dy=106.0, | ||||||||||||||
| item_dz=130.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -34,7 +34,113 @@ def bioyond_warehouse_1x4x2(name: str) -> WareHouse: | |||||||||||||
| category="warehouse", | ||||||||||||||
| removed_positions=None | ||||||||||||||
| ) | ||||||||||||||
| # 定义benyond的堆栈 | ||||||||||||||
| def bioyond_warehouse_1x2x2(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
|
Comment on lines
+38
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: The docstring does not match the function's configuration. Update the docstring to describe the correct warehouse dimensions (1x2x2) instead of 4x1x4.
Suggested change
|
||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=1, | ||||||||||||||
| num_items_y=2, | ||||||||||||||
| num_items_z=2, | ||||||||||||||
| dx=10.0, | ||||||||||||||
| dy=10.0, | ||||||||||||||
| dz=10.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
| def bioyond_warehouse_10x1x1(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
|
Comment on lines
+53
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Docstring does not match the function's configuration. Update the docstring to accurately describe the warehouse dimensions created by this function.
Suggested change
|
||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=10, | ||||||||||||||
| num_items_y=1, | ||||||||||||||
| num_items_z=1, | ||||||||||||||
| dx=10.0, | ||||||||||||||
| dy=10.0, | ||||||||||||||
| dz=10.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
| def bioyond_warehouse_1x3x3(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
|
Comment on lines
+68
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Docstring does not match the function's configuration. The docstring should describe a 1x3x3 warehouse to match the function's behavior.
Suggested change
|
||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=1, | ||||||||||||||
| num_items_y=3, | ||||||||||||||
| num_items_z=3, | ||||||||||||||
| dx=10.0, | ||||||||||||||
| dy=10.0, | ||||||||||||||
| dz=10.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
| def bioyond_warehouse_2x1x3(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
|
Comment on lines
+83
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Docstring does not match the function's configuration. The docstring should describe the function as creating a 2x1x3 warehouse, not a 4x1x4 warehouse.
Suggested change
|
||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=2, | ||||||||||||||
| num_items_y=1, | ||||||||||||||
| num_items_z=3, | ||||||||||||||
| dx=10.0, | ||||||||||||||
| dy=10.0, | ||||||||||||||
| dz=10.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| def bioyond_warehouse_3x3x1(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
|
Comment on lines
+99
to
+101
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Docstring does not match the function's configuration. Update the docstring to accurately describe the warehouse dimensions as 3x3x1.
Suggested change
|
||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=3, | ||||||||||||||
| num_items_y=3, | ||||||||||||||
| num_items_z=1, | ||||||||||||||
| dx=10.0, | ||||||||||||||
| dy=10.0, | ||||||||||||||
| dz=10.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
| def bioyond_warehouse_5x1x1(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
|
Comment on lines
+114
to
+116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Docstring does not match the function's configuration. Update the docstring to accurately describe the warehouse configuration as 5x1x1.
Suggested change
|
||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=5, | ||||||||||||||
| num_items_y=1, | ||||||||||||||
| num_items_z=1, | ||||||||||||||
| dx=10.0, | ||||||||||||||
| dy=10.0, | ||||||||||||||
| dz=10.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
| def bioyond_warehouse_3x3x1_2(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond 4x1x4仓库""" | ||||||||||||||
| return warehouse_factory( | ||||||||||||||
|
Comment on lines
+129
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Docstring does not match the function's configuration. Update the docstring to accurately describe the warehouse dimensions and configuration used in this function.
Suggested change
|
||||||||||||||
| name=name, | ||||||||||||||
| num_items_x=3, | ||||||||||||||
| num_items_y=3, | ||||||||||||||
| num_items_z=1, | ||||||||||||||
| dx=12.0, | ||||||||||||||
| dy=12.0, | ||||||||||||||
| dz=12.0, | ||||||||||||||
| item_dx=137.0, | ||||||||||||||
| item_dy=96.0, | ||||||||||||||
| item_dz=120.0, | ||||||||||||||
| category="warehouse", | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| def bioyond_warehouse_liquid_and_lid_handling(name: str) -> WareHouse: | ||||||||||||||
| """创建BioYond开关盖加液模块台面""" | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: The constructor ignores the size_x, size_y, size_z arguments.
The init method takes size_x, size_y, and size_z but does not use them, always passing fixed values to the superclass. If these parameters are meant to allow customization, they should be used instead of hardcoded values.