Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
914c0ad
Device visualization (#39)
q434343 Jun 9, 2025
7791837
fix move it
Xuwznln Jun 9, 2025
952f44a
Test
ElijahChang929 May 30, 2025
c24745a
Convert LH action to biomek.
ElijahChang929 May 30, 2025
011b249
新增transfer_biomek的msg
Xuwznln Jun 4, 2025
b568340
new actions
qxw138 Jun 6, 2025
68e49b0
1
qxw138 Jun 6, 2025
2ed8034
fix liquid_handler.biomek handles
TablewareBox Jun 7, 2025
843735e
biomek_test.py
qxw138 Jun 7, 2025
8b4dd0e
0608 DONE
ElijahChang929 Jun 8, 2025
a262461
Device visualization (#42)
Xuwznln Jun 12, 2025
aa5aac6
Add Mock Device for Organic Synthesis\添加有机合成的虚拟仪器和Protocol (#43)
KCFeng425 Jun 12, 2025
f5284f3
测试自动构建
Xuwznln Jun 13, 2025
59d3851
try build fix
Xuwznln Jun 13, 2025
ccbd4e8
try build
Xuwznln Jun 13, 2025
0319468
create container
Xuwznln Jun 15, 2025
0c68173
container 添加和更新完成
Xuwznln Jun 15, 2025
e440cd2
Device registry port (#49)
KCFeng425 Jun 22, 2025
e73c830
支持通过导入方式补全注册表,新增工作流unilabos_device_id字段
Xuwznln Jun 27, 2025
b337d86
Create 5 new protocols & bump version 0.9.8 (#59)
KCFeng425 Jul 4, 2025
e935e07
Update work_station.yaml (#60)
KCFeng425 Jul 5, 2025
763bafa
更新中析仪器,以及启动示例
Xuwznln Jul 6, 2025
9f820b8
更新实例
Xuwznln Jul 11, 2025
b5af034
更新实例
Xuwznln Jul 11, 2025
7d51466
更新实例
Xuwznln Jul 11, 2025
c0b1818
修正prcxi启动
Xuwznln Jul 11, 2025
8ff6460
更新PRCXI配置,修改主机地址和设置状态,并添加示例用法
ElijahChang929 Jul 11, 2025
4ae9964
Add plateT6 to PRCXI configuration and enhance error handling in liqu…
ElijahChang929 Jul 11, 2025
28e27b8
不生成已配置action的动作,增加prcxi的debug模式
Xuwznln Jul 15, 2025
bcc7f58
更新axis等参数
Xuwznln Jul 17, 2025
b610cf9
deck
Xuwznln Jul 17, 2025
e12b3f1
新增set liquid方法
Xuwznln Jul 17, 2025
4b15ec7
modify prcxi
Xuwznln Jul 17, 2025
e9b1dec
registry upadte
Xuwznln Jul 18, 2025
a295ce4
Update
ElijahChang929 Jul 18, 2025
cc42dc2
update
ElijahChang929 Jul 18, 2025
00d4e60
container_for_nothing
Xuwznln Jul 18, 2025
0b15751
Update
ElijahChang929 Jul 18, 2025
261936a
SET TIP RACK
Xuwznln Jul 18, 2025
ca51edf
update registry version & category
Xuwznln Jul 18, 2025
1551ded
fix: Protocol node resource run (#65)
TablewareBox Jul 18, 2025
b7a2d7a
采用http报送resource
Xuwznln Jul 19, 2025
0c99c8f
采用http报送resource
Xuwznln Jul 19, 2025
191c13b
Update for prcxi
ElijahChang929 Jul 19, 2025
a6e1863
Update
ElijahChang929 Jul 19, 2025
cca1fb4
Update
ElijahChang929 Jul 19, 2025
c9c98d0
Refactor PRCXI9300Deck initialization and update plate configurations
ElijahChang929 Jul 19, 2025
f400af3
test
ElijahChang929 Jul 19, 2025
ae4f07f
update
ElijahChang929 Jul 19, 2025
2667d43
Delete unnecessary files.
ElijahChang929 Jul 24, 2025
9833ac1
Device visualization (#67)
q434343 Jul 31, 2025
08415d9
更新注册表
Xuwznln Jul 31, 2025
c07a6fe
使用rattler-build进行构建测试
Xuwznln Aug 1, 2025
9e03641
dev 发版测试
Xuwznln Aug 1, 2025
22c4740
dev 发版测试
Xuwznln Aug 1, 2025
735c301
dev 发版测试
Xuwznln Aug 1, 2025
e1fdb9f
dev 发版测试
Xuwznln Aug 1, 2025
f719e2d
更新readme
Xuwznln Aug 1, 2025
f7cc9e9
add post link when installing
Xuwznln Aug 1, 2025
b014ab3
sync main
Xuwznln Aug 1, 2025
aa84564
bump version to 0.10.2
Xuwznln Aug 1, 2025
7b40812
添加环境检查功能,支持自动安装缺失的Python包;更新命令行参数以跳过环境检查;优化代码格式。
Xuwznln Aug 1, 2025
d6b96db
移除post-link脚本,更新构建配置以支持多平台构建,调整依赖项以适应不同操作系统。
Xuwznln Aug 1, 2025
07f016d
Merge branch 'main' into dev
Xuwznln Aug 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .conda/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package:
name: unilabos
version: 0.10.1
version: 0.10.2

source:
path: ../unilabos
target_directory: unilabos

build:
noarch: python
script:
- set PIP_NO_INDEX=
- if: win
Expand All @@ -33,8 +32,10 @@ requirements:
- conda-forge::python ==3.11.11
- compilers
- cmake
- make
- ninja
- if: unix
then:
- make
- sphinx
- sphinx_rtd_theme
- numpy
Expand Down
44 changes: 42 additions & 2 deletions .github/workflows/unilabos-conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches: [main, dev]
workflow_dispatch:
inputs:
platforms:
description: '选择构建平台 (逗号分隔): linux-64, osx-64, osx-arm64, win-64'
required: false
default: 'linux-64'
upload_to_anaconda:
description: '是否上传到Anaconda.org'
required: false
Expand All @@ -16,7 +20,20 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux-64
- os: macos-13 # Intel
platform: osx-64
- os: macos-latest # ARM64
platform: osx-arm64
- os: windows-latest
platform: win-64

runs-on: ${{ matrix.os }}

defaults:
run:
Expand All @@ -27,7 +44,21 @@ jobs:
with:
fetch-depth: 0

- name: Check if platform should be built
id: should_build
run: |
if [[ "${{ github.event_name }}" != "workflow_dispatch" ]]; then
echo "should_build=true" >> $GITHUB_OUTPUT
elif [[ -z "${{ github.event.inputs.platforms }}" ]]; then
echo "should_build=true" >> $GITHUB_OUTPUT
elif [[ "${{ github.event.inputs.platforms }}" == *"${{ matrix.platform }}"* ]]; then
echo "should_build=true" >> $GITHUB_OUTPUT
else
echo "should_build=false" >> $GITHUB_OUTPUT
fi

- name: Setup Miniconda
if: steps.should_build.outputs.should_build == 'true'
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: 'latest'
Expand All @@ -39,38 +70,47 @@ jobs:
show-channel-urls: true

- name: Install rattler-build and anaconda-client
if: steps.should_build.outputs.should_build == 'true'
run: |
conda install -c conda-forge rattler-build anaconda-client

- name: Show environment info
if: steps.should_build.outputs.should_build == 'true'
run: |
conda info
conda list | grep -E "(rattler-build|anaconda-client)"
echo "Platform: ${{ matrix.platform }}"
echo "OS: ${{ matrix.os }}"
echo "Building UniLabOS package"

- name: Build conda package
if: steps.should_build.outputs.should_build == 'true'
run: |
rattler-build build -r .conda/recipe.yaml -c uni-lab -c robostack-staging -c conda-forge

- name: List built packages
if: steps.should_build.outputs.should_build == 'true'
run: |
echo "Built packages in output directory:"
find ./output -name "*.conda" | head -10
ls -la ./output/${{ matrix.platform }}/ || echo "${{ matrix.platform }} directory not found"
ls -la ./output/noarch/ || echo "noarch directory not found"
echo "Output directory structure:"
find ./output -type f -name "*.conda"

- name: Prepare artifacts for upload
if: steps.should_build.outputs.should_build == 'true'
run: |
mkdir -p conda-packages-temp
find ./output -name "*.conda" -exec cp {} conda-packages-temp/ \;
echo "Copied files to temp directory:"
ls -la conda-packages-temp/

- name: Upload conda package artifacts
if: steps.should_build.outputs.should_build == 'true'
uses: actions/upload-artifact@v4
with:
name: conda-package-unilabos
name: conda-package-unilabos-${{ matrix.platform }}
path: conda-packages-temp
if-no-files-found: warn
retention-days: 30
Expand Down
2 changes: 1 addition & 1 deletion recipes/msgs/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: ros-humble-unilabos-msgs
version: 0.10.1
version: 0.10.2
source:
path: ../../unilabos_msgs
target_directory: src
Expand Down
2 changes: 1 addition & 1 deletion recipes/unilabos/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: unilabos
version: "0.10.1"
version: "0.10.2"

source:
path: ../..
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name=package_name,
version='0.10.1',
version='0.10.2',
packages=find_packages(),
include_package_data=True,
install_requires=['setuptools'],
Expand Down
30 changes: 26 additions & 4 deletions unilabos/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ def convert_argv_dashes_to_underscores(args: argparse.ArgumentParser):
for i, arg in enumerate(sys.argv):
for option_string in option_strings:
if arg.startswith(option_string):
new_arg = arg[:2] + arg[2:len(option_string)].replace("-", "_") + arg[len(option_string):]
new_arg = arg[:2] + arg[2 : len(option_string)].replace("-", "_") + arg[len(option_string) :]
sys.argv[i] = new_arg
break


def parse_args():
"""解析命令行参数"""
parser = argparse.ArgumentParser(description="Start Uni-Lab Edge server.")
Expand Down Expand Up @@ -128,6 +129,11 @@ def parse_args():
default="",
help="实验室唯一ID,也可通过环境变量 UNILABOS_MQCONFIG_LABID 设置或传入--config设置",
)
parser.add_argument(
"--skip_env_check",
action="store_true",
help="跳过启动时的环境依赖检查",
)
return parser


Expand All @@ -138,6 +144,17 @@ def main():
convert_argv_dashes_to_underscores(args)
args_dict = vars(args.parse_args())

# 环境检查 - 检查并自动安装必需的包 (可选)
if not args_dict.get("skip_env_check", False):
from unilabos.utils.environment_check import check_environment

print_status("正在进行环境依赖检查...", "info")
if not check_environment(auto_install=True):
print_status("环境检查失败,程序退出", "error")
os._exit(1)
else:
print_status("跳过环境依赖检查", "warning")

# 加载配置文件,优先加载config,然后从env读取
config_path = args_dict.get("config")
if os.getcwd().endswith("unilabos_data"):
Expand All @@ -151,17 +168,22 @@ def main():
if not os.path.exists(config_path):
print_status(
f"当前工作目录 {working_dir} 未找到local_config.py,请通过 --config 传入 local_config.py 文件路径",
"error")
"error",
)
os._exit(1)
elif os.path.exists(working_dir) and os.path.exists(os.path.join(working_dir, "local_config.py")):
config_path = os.path.join(working_dir, "local_config.py")
elif not config_path and (not os.path.exists(working_dir) or not os.path.exists(os.path.join(working_dir, "local_config.py"))):
elif not config_path and (
not os.path.exists(working_dir) or not os.path.exists(os.path.join(working_dir, "local_config.py"))
):
print_status(f"未指定config路径,可通过 --config 传入 local_config.py 文件路径", "info")
print_status(f"您是否为第一次使用?并将当前路径 {working_dir} 作为工作目录? (Y/n)", "info")
if input() != "n":
os.makedirs(working_dir, exist_ok=True)
config_path = os.path.join(working_dir, "local_config.py")
shutil.copy(os.path.join(os.path.dirname(os.path.dirname(__file__)), "config", "example_config.py"), config_path)
shutil.copy(
os.path.join(os.path.dirname(os.path.dirname(__file__)), "config", "example_config.py"), config_path
)
print_status(f"已创建 local_config.py 路径: {config_path}", "info")
print_status(f"请在文件夹中配置lab_id,放入下载的CA.crt、lab.crt、lab.key重新启动本程序", "info")
os._exit(1)
Expand Down
5 changes: 3 additions & 2 deletions unilabos/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from unilabos.utils.log import logger
from unilabos.utils.environment_check import check_environment, EnvironmentChecker

# 确保日志配置在导入utils包时自动应用
# 这样任何导入utils包或其子模块的代码都会自动配置好日志

# 导出logger,使其可以通过from unilabos.utils import logger直接导入
__all__ = ['logger']
# 导出logger和环境检查工具,使其可以直接导入
__all__ = ["logger", "check_environment", "EnvironmentChecker"]
Loading
Loading