From 01adf7ca9265affef5faad4b908387f54f883210 Mon Sep 17 00:00:00 2001 From: dijkstra402 Date: Fri, 24 Oct 2025 13:49:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86=20BIOYOND=5FPolymerStatio?= =?UTF-8?q?n=5F=20=E5=89=8D=E7=BC=80=E7=BB=9F=E4=B8=80=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=20YB=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重命名 bottles.py 中所有工厂函数:BIOYOND_PolymerStation_* -> YB_* - 重命名 bottle_carriers.py 中所有载具工厂函数和导入 - 更新 registry YAML 文件中的 module 引用 - 更新 MATERIAL_TYPE_MAPPINGS 配置中的类型字符串 - 更新测试文件和样例 JSON 中的类型引用 - 添加 YB_* 别名条目到 registry 以支持双键访问 --- .../experiments/reaction_station_bioyond.json | 14 +- .../reaction_station_bioyond_test.json | 6 +- test/resources/test_bottle_carrier.py | 8 +- test/resources/test_converter_bioyond.py | 14 +- test/resources/test_resourcetreeset.py | 14 +- .../workstation/bioyond_studio/config.py | 31 +++- .../resources/bioyond/bottle_carriers.yaml | 22 +-- .../registry/resources/bioyond/bottles.yaml | 169 ++++++++++++++++-- unilabos/resources/bioyond/bottle_carriers.py | 70 ++++---- unilabos/resources/bioyond/bottles.py | 28 +-- 10 files changed, 266 insertions(+), 110 deletions(-) diff --git a/test/experiments/reaction_station_bioyond.json b/test/experiments/reaction_station_bioyond.json index 013855ed..ca8bd683 100644 --- a/test/experiments/reaction_station_bioyond.json +++ b/test/experiments/reaction_station_bioyond.json @@ -24,13 +24,13 @@ "Drip_back": "3a162cf9-6aac-565a-ddd7-682ba1796a4a" }, "material_type_mappings": { - "烧杯": ["BIOYOND_PolymerStation_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"], - "试剂瓶": ["BIOYOND_PolymerStation_1BottleCarrier", ""], - "样品板": ["BIOYOND_PolymerStation_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"], - "分装板": ["BIOYOND_PolymerStation_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"], - "样品瓶": ["BIOYOND_PolymerStation_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"], - "90%分装小瓶": ["BIOYOND_PolymerStation_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"], - "10%分装小瓶": ["BIOYOND_PolymerStation_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"] + "烧杯": ["YB_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"], + "试剂瓶": ["YB_1BottleCarrier", ""], + "样品板": ["YB_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"], + "分装板": ["YB_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"], + "样品瓶": ["YB_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"], + "90%分装小瓶": ["YB_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"], + "10%分装小瓶": ["YB_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"] } }, "deck": { diff --git a/test/experiments/reaction_station_bioyond_test.json b/test/experiments/reaction_station_bioyond_test.json index 8446373a..67a0d468 100644 --- a/test/experiments/reaction_station_bioyond_test.json +++ b/test/experiments/reaction_station_bioyond_test.json @@ -24,9 +24,9 @@ "Drip_back": "3a162cf9-6aac-565a-ddd7-682ba1796a4a" }, "material_type_mappings": { - "烧杯": "BIOYOND_PolymerStation_1FlaskCarrier", - "试剂瓶": "BIOYOND_PolymerStation_1BottleCarrier", - "样品板": "BIOYOND_PolymerStation_6VialCarrier" + "烧杯": "YB_1FlaskCarrier", + "试剂瓶": "YB_1BottleCarrier", + "样品板": "YB_6VialCarrier" } }, "deck": { diff --git a/test/resources/test_bottle_carrier.py b/test/resources/test_bottle_carrier.py index c981eeeb..f0a2749f 100644 --- a/test/resources/test_bottle_carrier.py +++ b/test/resources/test_bottle_carrier.py @@ -1,7 +1,7 @@ import pytest from unilabos.resources.bioyond.bottle_carriers import BIOYOND_Electrolyte_6VialCarrier, BIOYOND_Electrolyte_1BottleCarrier -from unilabos.resources.bioyond.bottles import BIOYOND_PolymerStation_Solid_Vial, BIOYOND_PolymerStation_Solution_Beaker, BIOYOND_PolymerStation_Reagent_Bottle +from unilabos.resources.bioyond.bottles import YB_Solid_Vial, YB_Solution_Beaker, YB_Reagent_Bottle def test_bottle_carrier() -> "BottleCarrier": @@ -16,9 +16,9 @@ def test_bottle_carrier() -> "BottleCarrier": print(f"1烧杯载架: {beaker_carrier.name}, 位置数: {len(beaker_carrier.sites)}") # 创建瓶子和烧杯 - powder_bottle = BIOYOND_PolymerStation_Solid_Vial("powder_bottle_01") - solution_beaker = BIOYOND_PolymerStation_Solution_Beaker("solution_beaker_01") - reagent_bottle = BIOYOND_PolymerStation_Reagent_Bottle("reagent_bottle_01") + powder_bottle = YB_Solid_Vial("powder_bottle_01") + solution_beaker = YB_Solution_Beaker("solution_beaker_01") + reagent_bottle = YB_Reagent_Bottle("reagent_bottle_01") print(f"\n创建的物料:") print(f"粉末瓶: {powder_bottle.name} - {powder_bottle.diameter}mm x {powder_bottle.height}mm, {powder_bottle.max_volume}μL") diff --git a/test/resources/test_converter_bioyond.py b/test/resources/test_converter_bioyond.py index 068a0530..d87415b9 100644 --- a/test/resources/test_converter_bioyond.py +++ b/test/resources/test_converter_bioyond.py @@ -12,13 +12,13 @@ lab_registry.setup() type_mapping = { - "烧杯": ("BIOYOND_PolymerStation_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"), - "试剂瓶": ("BIOYOND_PolymerStation_1BottleCarrier", ""), - "样品板": ("BIOYOND_PolymerStation_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"), - "分装板": ("BIOYOND_PolymerStation_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"), - "样品瓶": ("BIOYOND_PolymerStation_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"), - "90%分装小瓶": ("BIOYOND_PolymerStation_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"), - "10%分装小瓶": ("BIOYOND_PolymerStation_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"), + "烧杯": ("YB_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"), + "试剂瓶": ("YB_1BottleCarrier", ""), + "样品板": ("YB_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"), + "分装板": ("YB_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"), + "样品瓶": ("YB_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"), + "90%分装小瓶": ("YB_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"), + "10%分装小瓶": ("YB_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"), } diff --git a/test/resources/test_resourcetreeset.py b/test/resources/test_resourcetreeset.py index 1ba9ab20..ff5cfd06 100644 --- a/test/resources/test_resourcetreeset.py +++ b/test/resources/test_resourcetreeset.py @@ -13,13 +13,13 @@ lab_registry.setup() type_mapping = { - "烧杯": ("BIOYOND_PolymerStation_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"), - "试剂瓶": ("BIOYOND_PolymerStation_1BottleCarrier", ""), - "样品板": ("BIOYOND_PolymerStation_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"), - "分装板": ("BIOYOND_PolymerStation_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"), - "样品瓶": ("BIOYOND_PolymerStation_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"), - "90%分装小瓶": ("BIOYOND_PolymerStation_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"), - "10%分装小瓶": ("BIOYOND_PolymerStation_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"), + "烧杯": ("YB_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"), + "试剂瓶": ("YB_1BottleCarrier", ""), + "样品板": ("YB_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"), + "分装板": ("YB_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"), + "样品瓶": ("YB_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"), + "90%分装小瓶": ("YB_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"), + "10%分装小瓶": ("YB_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"), } diff --git a/unilabos/devices/workstation/bioyond_studio/config.py b/unilabos/devices/workstation/bioyond_studio/config.py index 92943005..9a27320d 100644 --- a/unilabos/devices/workstation/bioyond_studio/config.py +++ b/unilabos/devices/workstation/bioyond_studio/config.py @@ -26,7 +26,6 @@ BIOYOND_FULL_CONFIG = { "HTTP_host": os.getenv("BIOYOND_HTTP_HOST", "0.0.0.0"), # HTTP服务监听地址(0.0.0.0 表示监听所有网络接口) "HTTP_port": int(os.getenv("BIOYOND_HTTP_PORT", "8080")), "report_ip": os.getenv("BIOYOND_REPORT_IP", "172.21.32.172"), # 报送给 Bioyond 的本机IP地址(留空则自动检测) - # 调试模式 "debug_mode": os.getenv("BIOYOND_DEBUG_MODE", "False").lower() == "true", } @@ -142,13 +141,29 @@ WAREHOUSE_MAPPING = { # 物料类型配置 MATERIAL_TYPE_MAPPINGS = { - "烧杯": ("BIOYOND_PolymerStation_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"), - "试剂瓶": ("BIOYOND_PolymerStation_1BottleCarrier", ""), - "样品板": ("BIOYOND_PolymerStation_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"), - "分装板": ("BIOYOND_PolymerStation_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"), - "样品瓶": ("BIOYOND_PolymerStation_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"), - "90%分装小瓶": ("BIOYOND_PolymerStation_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"), - "10%分装小瓶": ("BIOYOND_PolymerStation_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"), + "烧杯": ("YB_1FlaskCarrier", "3a14196b-24f2-ca49-9081-0cab8021bf1a"), + "试剂瓶": ("YB_1BottleCarrier", ""), + "样品板": ("YB_6StockCarrier", "3a14196e-b7a0-a5da-1931-35f3000281e9"), + "分装板": ("YB_6VialCarrier", "3a14196e-5dfe-6e21-0c79-fe2036d052c4"), + "样品瓶": ("YB_Solid_Stock", "3a14196a-cf7d-8aea-48d8-b9662c7dba94"), + "90%分装小瓶": ("YB_Solid_Vial", "3a14196c-cdcf-088d-dc7d-5cf38f0ad9ea"), + "10%分装小瓶": ("YB_Liquid_Vial", "3a14196c-76be-2279-4e22-7310d69aed68"), + "20ml分液瓶": ("YB_20ml_Dispensing_Vial", "3a192c2b-19e8-f0a3-035e-041ca8ca1035"), + "100ml液体": ("YB_100ml_Liquid_Bottle", "d37166b3-ecaa-481e-bd84-3032b795ba07"), + "液": ("YB_Liquid_Bottle", "3a190ca1-2add-2b23-f8e1-bbd348b7f790"), + "高粘液": ("YB_High_Viscosity_Liquid_Bottle", "abe8df30-563d-43d2-85e0-cabec59ddc16"), + "加样头(大)": ("YB_Large_Dispense_Head", "3a190ca0-b2f6-9aeb-8067-547e72c11469"), + "5ml分液瓶板": ("YB_6x5ml_DispensingVialCarrier", "3a192fa4-007d-ec7b-456e-2a8be7a13f23"), + "5ml分液瓶": ("YB_5ml_Dispensing_Vial", "3a192c2a-ebb7-58a1-480d-8b3863bf74f4"), + "20ml分液瓶板": ("YB_6x20ml_DispensingVialCarrier", "3a192fa4-47db-3449-162a-eaf8aba57e27"), + "配液瓶(小)板": ("YB_6x_SmallSolutionBottleCarrier", "3a190c8b-3284-af78-d29f-9a69463ad047"), + "配液瓶(小)": ("YB_Small_Solution_Bottle", "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"), + "配液瓶(大)板": ("YB_4x_LargeSolutionBottleCarrier", "53e50377-32dc-4781-b3c0-5ce45bc7dc27"), + "配液瓶(大)": ("YB_Large_Solution_Bottle", "19c52ad1-51c5-494f-8854-576f4ca9c6ca"), + "加样头(大)板": ("YB_6x_LargeDispenseHeadCarrier", "a8e714ae-2a4e-4eb9-9614-e4c140ec3f16"), + "适配器块": ("YB_AdapterBlock", "efc3bb32-d504-4890-91c0-b64ed3ac80cf"), + "枪头盒": ("YB_TipBox", "3a192c2e-20f3-a44a-0334-c8301839d0b3"), + "枪头": ("YB_Pipette_Tip", "b6196971-1050-46da-9927-333e8dea062d"), } # 步骤参数配置(各工作流的步骤UUID) diff --git a/unilabos/registry/resources/bioyond/bottle_carriers.yaml b/unilabos/registry/resources/bioyond/bottle_carriers.yaml index 5889bccc..0e40c9c8 100644 --- a/unilabos/registry/resources/bioyond/bottle_carriers.yaml +++ b/unilabos/registry/resources/bioyond/bottle_carriers.yaml @@ -2,7 +2,7 @@ category: - bottle_carriers class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_1BottleCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_1BottleCarrier type: pylabrobot description: 1BottleCarrier handles: [] @@ -14,7 +14,7 @@ category: - bottle_carriers class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_1FlaskCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_1FlaskCarrier type: pylabrobot description: 1FlaskCarrier handles: [] @@ -26,7 +26,7 @@ category: - bottle_carriers class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_6StockCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_6StockCarrier type: pylabrobot description: 6StockCarrier handles: [] @@ -38,7 +38,7 @@ category: - bottle_carriers class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_6VialCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_6VialCarrier type: pylabrobot description: 6VialCarrier handles: [] @@ -50,7 +50,7 @@ category: - yb3 class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_6x5ml_DispensingVialCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_6x5ml_DispensingVialCarrier type: pylabrobot description: 6x5ml_DispensingVialCarrier handles: [] @@ -62,7 +62,7 @@ category: - yb3 class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_6x20ml_DispensingVialCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_6x20ml_DispensingVialCarrier type: pylabrobot description: 6x20ml_DispensingVialCarrier handles: [] @@ -74,7 +74,7 @@ category: - yb3 class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_6x_SmallSolutionBottleCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_6x_SmallSolutionBottleCarrier type: pylabrobot description: 6x_SmallSolutionBottleCarrier handles: [] @@ -86,7 +86,7 @@ category: - yb3 class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_4x_LargeSolutionBottleCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_4x_LargeSolutionBottleCarrier type: pylabrobot description: 4x_LargeSolutionBottleCarrier handles: [] @@ -98,7 +98,7 @@ category: - yb3 class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_6x_LargeDispenseHeadCarrier + module: unilabos.resources.bioyond.bottle_carriers:YB_6x_LargeDispenseHeadCarrier type: pylabrobot description: 6x_LargeDispenseHeadCarrier handles: [] @@ -110,7 +110,7 @@ AdapterBlock: category: - yb3 class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_AdapterBlock + module: unilabos.resources.bioyond.bottle_carriers:YB_AdapterBlock type: pylabrobot description: AdapterBlock handles: [] @@ -122,7 +122,7 @@ TipBox: category: - yb3 class: - module: unilabos.resources.bioyond.bottle_carriers:BIOYOND_PolymerStation_TipBox + module: unilabos.resources.bioyond.bottle_carriers:YB_TipBox type: pylabrobot description: TipBox handles: [] diff --git a/unilabos/registry/resources/bioyond/bottles.yaml b/unilabos/registry/resources/bioyond/bottles.yaml index 8d71f287..af6718ab 100644 --- a/unilabos/registry/resources/bioyond/bottles.yaml +++ b/unilabos/registry/resources/bioyond/bottles.yaml @@ -2,7 +2,7 @@ Liquid_Vial: category: - bottles class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Liquid_Vial + module: unilabos.resources.bioyond.bottles:YB_Liquid_Vial type: pylabrobot handles: [] icon: '' @@ -12,7 +12,7 @@ Reagent_Bottle: category: - bottles class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Reagent_Bottle + module: unilabos.resources.bioyond.bottles:YB_Reagent_Bottle type: pylabrobot handles: [] icon: '' @@ -22,7 +22,7 @@ Solid_Stock: category: - bottles class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Solid_Stock + module: unilabos.resources.bioyond.bottles:YB_Solid_Stock type: pylabrobot handles: [] icon: '' @@ -32,7 +32,7 @@ Solid_Vial: category: - bottles class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Solid_Vial + module: unilabos.resources.bioyond.bottles:YB_Solid_Vial type: pylabrobot handles: [] icon: '' @@ -42,7 +42,7 @@ Solution_Beaker: category: - bottles class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Solution_Beaker + module: unilabos.resources.bioyond.bottles:YB_Solution_Beaker type: pylabrobot handles: [] icon: '' @@ -52,7 +52,7 @@ Solution_Beaker: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_100ml_Liquid_Bottle + module: unilabos.resources.bioyond.bottles:YB_100ml_Liquid_Bottle type: pylabrobot handles: [] icon: '' @@ -62,7 +62,7 @@ Liquid_Bottle: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Liquid_Bottle + module: unilabos.resources.bioyond.bottles:YB_Liquid_Bottle type: pylabrobot handles: [] icon: '' @@ -72,7 +72,7 @@ High_Viscosity_Liquid_Bottle: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_High_Viscosity_Liquid_Bottle + module: unilabos.resources.bioyond.bottles:YB_High_Viscosity_Liquid_Bottle type: pylabrobot handles: [] icon: '' @@ -82,7 +82,7 @@ Large_Dispense_Head: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Large_Dispense_Head + module: unilabos.resources.bioyond.bottles:YB_Large_Dispense_Head type: pylabrobot handles: [] icon: '' @@ -92,7 +92,7 @@ Large_Dispense_Head: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_5ml_Dispensing_Vial + module: unilabos.resources.bioyond.bottles:YB_5ml_Dispensing_Vial type: pylabrobot handles: [] icon: '' @@ -102,7 +102,7 @@ Large_Dispense_Head: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_20ml_Dispensing_Vial + module: unilabos.resources.bioyond.bottles:YB_20ml_Dispensing_Vial type: pylabrobot handles: [] icon: '' @@ -112,7 +112,7 @@ Small_Solution_Bottle: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Small_Solution_Bottle + module: unilabos.resources.bioyond.bottles:YB_Small_Solution_Bottle type: pylabrobot handles: [] icon: '' @@ -122,7 +122,7 @@ Large_Solution_Bottle: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Large_Solution_Bottle + module: unilabos.resources.bioyond.bottles:YB_Large_Solution_Bottle type: pylabrobot handles: [] icon: '' @@ -132,9 +132,150 @@ Pipette_Tip: category: - yb3 class: - module: unilabos.resources.bioyond.bottles:BIOYOND_PolymerStation_Pipette_Tip + module: unilabos.resources.bioyond.bottles:YB_Pipette_Tip type: pylabrobot handles: [] icon: '' init_param_schema: {} version: 1.0.0 + +YB_Liquid_Vial: + category: + - bottles + class: + module: unilabos.resources.bioyond.bottles:YB_Liquid_Vial + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Reagent_Bottle: + category: + - bottles + class: + module: unilabos.resources.bioyond.bottles:YB_Reagent_Bottle + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Solid_Stock: + category: + - bottles + class: + module: unilabos.resources.bioyond.bottles:YB_Solid_Stock + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Solid_Vial: + category: + - bottles + class: + module: unilabos.resources.bioyond.bottles:YB_Solid_Vial + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Solution_Beaker: + category: + - bottles + class: + module: unilabos.resources.bioyond.bottles:YB_Solution_Beaker + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_100ml_Liquid_Bottle: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_100ml_Liquid_Bottle + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Liquid_Bottle: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_Liquid_Bottle + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_High_Viscosity_Liquid_Bottle: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_High_Viscosity_Liquid_Bottle + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Large_Dispense_Head: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_Large_Dispense_Head + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_5ml_Dispensing_Vial: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_5ml_Dispensing_Vial + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_20ml_Dispensing_Vial: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_20ml_Dispensing_Vial + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Small_Solution_Bottle: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_Small_Solution_Bottle + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Large_Solution_Bottle: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_Large_Solution_Bottle + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 +YB_Pipette_Tip: + category: + - yb3 + class: + module: unilabos.resources.bioyond.bottles:YB_Pipette_Tip + type: pylabrobot + handles: [] + icon: '' + init_param_schema: {} + version: 1.0.0 diff --git a/unilabos/resources/bioyond/bottle_carriers.py b/unilabos/resources/bioyond/bottle_carriers.py index ab0b6560..76e3a935 100644 --- a/unilabos/resources/bioyond/bottle_carriers.py +++ b/unilabos/resources/bioyond/bottle_carriers.py @@ -2,17 +2,17 @@ from pylabrobot.resources import create_homogeneous_resources, Coordinate, Resou from unilabos.resources.itemized_carrier import Bottle, BottleCarrier from unilabos.resources.bioyond.bottles import ( - BIOYOND_PolymerStation_Solid_Stock, - BIOYOND_PolymerStation_Solid_Vial, - BIOYOND_PolymerStation_Liquid_Vial, - BIOYOND_PolymerStation_Solution_Beaker, - BIOYOND_PolymerStation_Reagent_Bottle, - BIOYOND_PolymerStation_5ml_Dispensing_Vial, - BIOYOND_PolymerStation_20ml_Dispensing_Vial, - BIOYOND_PolymerStation_Small_Solution_Bottle, - BIOYOND_PolymerStation_Large_Solution_Bottle, - BIOYOND_PolymerStation_Large_Dispense_Head, - BIOYOND_PolymerStation_Pipette_Tip + YB_Solid_Stock, + YB_Solid_Vial, + YB_Liquid_Vial, + YB_Solution_Beaker, + YB_Reagent_Bottle, + YB_5ml_Dispensing_Vial, + YB_20ml_Dispensing_Vial, + YB_Small_Solution_Bottle, + YB_Large_Solution_Bottle, + YB_Large_Dispense_Head, + YB_Pipette_Tip ) # 命名约定:试剂瓶-Bottle,烧杯-Beaker,烧瓶-Flask,小瓶-Vial @@ -63,7 +63,7 @@ def BIOYOND_Electrolyte_6VialCarrier(name: str) -> BottleCarrier: carrier.num_items_y = 2 carrier.num_items_z = 1 for i in range(6): - carrier[i] = BIOYOND_PolymerStation_Solid_Vial(f"{name}_vial_{i+1}") + carrier[i] = YB_Solid_Vial(f"{name}_vial_{i+1}") return carrier @@ -100,11 +100,11 @@ def BIOYOND_Electrolyte_1BottleCarrier(name: str) -> BottleCarrier: carrier.num_items_x = 1 carrier.num_items_y = 1 carrier.num_items_z = 1 - carrier[0] = BIOYOND_PolymerStation_Solution_Beaker(f"{name}_beaker_1") + carrier[0] = YB_Solution_Beaker(f"{name}_beaker_1") return carrier -def BIOYOND_PolymerStation_6StockCarrier(name: str) -> BottleCarrier: +def YB_6StockCarrier(name: str) -> BottleCarrier: """6瓶载架 - 2x3布局""" # 载架尺寸 (mm) @@ -151,11 +151,11 @@ def BIOYOND_PolymerStation_6StockCarrier(name: str) -> BottleCarrier: carrier.num_items_z = 1 ordering = ["A1", "A2", "A3", "B1", "B2", "B3"] # 自定义顺序 for i in range(6): - carrier[i] = BIOYOND_PolymerStation_Solid_Stock(f"{name}_vial_{ordering[i]}") + carrier[i] = YB_Solid_Stock(f"{name}_vial_{ordering[i]}") return carrier -def BIOYOND_PolymerStation_6VialCarrier(name: str) -> BottleCarrier: +def YB_6VialCarrier(name: str) -> BottleCarrier: """6瓶载架 - 2x3布局""" # 载架尺寸 (mm) @@ -202,13 +202,13 @@ def BIOYOND_PolymerStation_6VialCarrier(name: str) -> BottleCarrier: carrier.num_items_z = 1 ordering = ["A1", "A2", "A3", "B1", "B2", "B3"] # 自定义顺序 for i in range(3): - carrier[i] = BIOYOND_PolymerStation_Solid_Vial(f"{name}_solidvial_{ordering[i]}") + carrier[i] = YB_Solid_Vial(f"{name}_solidvial_{ordering[i]}") for i in range(3, 6): - carrier[i] = BIOYOND_PolymerStation_Liquid_Vial(f"{name}_liquidvial_{ordering[i]}") + carrier[i] = YB_Liquid_Vial(f"{name}_liquidvial_{ordering[i]}") return carrier -def BIOYOND_PolymerStation_1BottleCarrier(name: str) -> BottleCarrier: +def YB_1BottleCarrier(name: str) -> BottleCarrier: """1瓶载架 - 单个中央位置""" # 载架尺寸 (mm) @@ -241,11 +241,11 @@ def BIOYOND_PolymerStation_1BottleCarrier(name: str) -> BottleCarrier: carrier.num_items_x = 1 carrier.num_items_y = 1 carrier.num_items_z = 1 - carrier[0] = BIOYOND_PolymerStation_Reagent_Bottle(f"{name}_flask_1") + carrier[0] = YB_Reagent_Bottle(f"{name}_flask_1") return carrier -def BIOYOND_PolymerStation_1FlaskCarrier(name: str) -> BottleCarrier: +def YB_1FlaskCarrier(name: str) -> BottleCarrier: """1瓶载架 - 单个中央位置""" # 载架尺寸 (mm) @@ -278,11 +278,11 @@ def BIOYOND_PolymerStation_1FlaskCarrier(name: str) -> BottleCarrier: carrier.num_items_x = 1 carrier.num_items_y = 1 carrier.num_items_z = 1 - carrier[0] = BIOYOND_PolymerStation_Reagent_Bottle(f"{name}_bottle_1") + carrier[0] = YB_Reagent_Bottle(f"{name}_bottle_1") return carrier -def BIOYOND_PolymerStation_6x5ml_DispensingVialCarrier(name: str) -> BottleCarrier: +def YB_6x5ml_DispensingVialCarrier(name: str) -> BottleCarrier: """5ml分液瓶板 - 4x2布局,8个位置""" # 载架尺寸 (mm) @@ -328,11 +328,11 @@ def BIOYOND_PolymerStation_6x5ml_DispensingVialCarrier(name: str) -> BottleCarri carrier.num_items_z = 1 ordering = ["A1", "A2", "A3", "A4", "B1", "B2", "B3", "B4"] for i in range(8): - carrier[i] = BIOYOND_PolymerStation_5ml_Dispensing_Vial(f"{name}_vial_{ordering[i]}") + carrier[i] = YB_5ml_Dispensing_Vial(f"{name}_vial_{ordering[i]}") return carrier -def BIOYOND_PolymerStation_6x20ml_DispensingVialCarrier(name: str) -> BottleCarrier: +def YB_6x20ml_DispensingVialCarrier(name: str) -> BottleCarrier: """20ml分液瓶板 - 4x2布局,8个位置""" # 载架尺寸 (mm) @@ -378,11 +378,11 @@ def BIOYOND_PolymerStation_6x20ml_DispensingVialCarrier(name: str) -> BottleCarr carrier.num_items_z = 1 ordering = ["A1", "A2", "A3", "A4", "B1", "B2", "B3", "B4"] for i in range(8): - carrier[i] = BIOYOND_PolymerStation_20ml_Dispensing_Vial(f"{name}_vial_{ordering[i]}") + carrier[i] = YB_20ml_Dispensing_Vial(f"{name}_vial_{ordering[i]}") return carrier -def BIOYOND_PolymerStation_6x_SmallSolutionBottleCarrier(name: str) -> BottleCarrier: +def YB_6x_SmallSolutionBottleCarrier(name: str) -> BottleCarrier: """配液瓶(小)板 - 4x2布局,8个位置""" # 载架尺寸 (mm) @@ -428,11 +428,11 @@ def BIOYOND_PolymerStation_6x_SmallSolutionBottleCarrier(name: str) -> BottleCar carrier.num_items_z = 1 ordering = ["A1", "A2", "A3", "A4", "B1", "B2", "B3", "B4"] for i in range(8): - carrier[i] = BIOYOND_PolymerStation_Small_Solution_Bottle(f"{name}_bottle_{ordering[i]}") + carrier[i] = YB_Small_Solution_Bottle(f"{name}_bottle_{ordering[i]}") return carrier -def BIOYOND_PolymerStation_4x_LargeSolutionBottleCarrier(name: str) -> BottleCarrier: +def YB_4x_LargeSolutionBottleCarrier(name: str) -> BottleCarrier: """配液瓶(大)板 - 2x2布局,4个位置""" # 载架尺寸 (mm) @@ -478,11 +478,11 @@ def BIOYOND_PolymerStation_4x_LargeSolutionBottleCarrier(name: str) -> BottleCar carrier.num_items_z = 1 ordering = ["A1", "A2", "B1", "B2"] for i in range(4): - carrier[i] = BIOYOND_PolymerStation_Large_Solution_Bottle(f"{name}_bottle_{ordering[i]}") + carrier[i] = YB_Large_Solution_Bottle(f"{name}_bottle_{ordering[i]}") return carrier -def BIOYOND_PolymerStation_6x_LargeDispenseHeadCarrier(name: str) -> BottleCarrier: +def YB_6x_LargeDispenseHeadCarrier(name: str) -> BottleCarrier: """加样头(大)板 - 1x1布局,1个位置""" # 载架尺寸 (mm) @@ -526,11 +526,11 @@ def BIOYOND_PolymerStation_6x_LargeDispenseHeadCarrier(name: str) -> BottleCarri carrier.num_items_x = 1 carrier.num_items_y = 1 carrier.num_items_z = 1 - carrier[0] = BIOYOND_PolymerStation_Large_Dispense_Head(f"{name}_head_1") + carrier[0] = YB_Large_Dispense_Head(f"{name}_head_1") return carrier -def BIOYOND_PolymerStation_AdapterBlock(name: str) -> BottleCarrier: +def YB_AdapterBlock(name: str) -> BottleCarrier: """适配器块 - 单个中央位置""" # 载架尺寸 (mm) @@ -567,7 +567,7 @@ def BIOYOND_PolymerStation_AdapterBlock(name: str) -> BottleCarrier: return carrier -def BIOYOND_PolymerStation_TipBox(name: str) -> BottleCarrier: +def YB_TipBox(name: str) -> BottleCarrier: """枪头盒 - 8x12布局,96个位置""" # 载架尺寸 (mm) @@ -615,6 +615,6 @@ def BIOYOND_PolymerStation_TipBox(name: str) -> BottleCarrier: for i in range(96): row = chr(65 + i // 12) # A-H col = (i % 12) + 1 # 1-12 - carrier[i] = BIOYOND_PolymerStation_Pipette_Tip(f"{name}_tip_{row}{col}") + carrier[i] = YB_Pipette_Tip(f"{name}_tip_{row}{col}") return carrier diff --git a/unilabos/resources/bioyond/bottles.py b/unilabos/resources/bioyond/bottles.py index b5fb087d..efabea25 100644 --- a/unilabos/resources/bioyond/bottles.py +++ b/unilabos/resources/bioyond/bottles.py @@ -2,7 +2,7 @@ from unilabos.resources.itemized_carrier import Bottle, BottleCarrier # 工厂函数 -def BIOYOND_PolymerStation_Solid_Stock( +def YB_Solid_Stock( name: str, diameter: float = 20.0, height: float = 100.0, @@ -20,7 +20,7 @@ def BIOYOND_PolymerStation_Solid_Stock( ) -def BIOYOND_PolymerStation_Solid_Vial( +def YB_Solid_Vial( name: str, diameter: float = 25.0, height: float = 60.0, @@ -38,7 +38,7 @@ def BIOYOND_PolymerStation_Solid_Vial( ) -def BIOYOND_PolymerStation_Liquid_Vial( +def YB_Liquid_Vial( name: str, diameter: float = 25.0, height: float = 60.0, @@ -56,7 +56,7 @@ def BIOYOND_PolymerStation_Liquid_Vial( ) -def BIOYOND_PolymerStation_Solution_Beaker( +def YB_Solution_Beaker( name: str, diameter: float = 60.0, height: float = 70.0, @@ -74,7 +74,7 @@ def BIOYOND_PolymerStation_Solution_Beaker( ) -def BIOYOND_PolymerStation_Reagent_Bottle( +def YB_Reagent_Bottle( name: str, diameter: float = 70.0, height: float = 120.0, @@ -92,7 +92,7 @@ def BIOYOND_PolymerStation_Reagent_Bottle( ) -def BIOYOND_PolymerStation_100ml_Liquid_Bottle( +def YB_100ml_Liquid_Bottle( name: str, diameter: float = 50.0, height: float = 80.0, @@ -110,7 +110,7 @@ def BIOYOND_PolymerStation_100ml_Liquid_Bottle( ) -def BIOYOND_PolymerStation_Liquid_Bottle( +def YB_Liquid_Bottle( name: str, diameter: float = 40.0, height: float = 70.0, @@ -128,7 +128,7 @@ def BIOYOND_PolymerStation_Liquid_Bottle( ) -def BIOYOND_PolymerStation_High_Viscosity_Liquid_Bottle( +def YB_High_Viscosity_Liquid_Bottle( name: str, diameter: float = 45.0, height: float = 75.0, @@ -146,7 +146,7 @@ def BIOYOND_PolymerStation_High_Viscosity_Liquid_Bottle( ) -def BIOYOND_PolymerStation_Large_Dispense_Head( +def YB_Large_Dispense_Head( name: str, diameter: float = 35.0, height: float = 90.0, @@ -164,7 +164,7 @@ def BIOYOND_PolymerStation_Large_Dispense_Head( ) -def BIOYOND_PolymerStation_5ml_Dispensing_Vial( +def YB_5ml_Dispensing_Vial( name: str, diameter: float = 15.0, height: float = 45.0, @@ -182,7 +182,7 @@ def BIOYOND_PolymerStation_5ml_Dispensing_Vial( ) -def BIOYOND_PolymerStation_20ml_Dispensing_Vial( +def YB_20ml_Dispensing_Vial( name: str, diameter: float = 20.0, height: float = 65.0, @@ -200,7 +200,7 @@ def BIOYOND_PolymerStation_20ml_Dispensing_Vial( ) -def BIOYOND_PolymerStation_Small_Solution_Bottle( +def YB_Small_Solution_Bottle( name: str, diameter: float = 35.0, height: float = 60.0, @@ -218,7 +218,7 @@ def BIOYOND_PolymerStation_Small_Solution_Bottle( ) -def BIOYOND_PolymerStation_Large_Solution_Bottle( +def YB_Large_Solution_Bottle( name: str, diameter: float = 55.0, height: float = 90.0, @@ -236,7 +236,7 @@ def BIOYOND_PolymerStation_Large_Solution_Bottle( ) -def BIOYOND_PolymerStation_Pipette_Tip( +def YB_Pipette_Tip( name: str, diameter: float = 10.0, height: float = 50.0,