-
Notifications
You must be signed in to change notification settings - Fork 41
Dev test #103
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
Conversation
* delete deprecated mock devices * rename categories * combine chromatographic devices * rename rviz simulation nodes * organic virtual devices * parse vessel_id * run registry completion before merge --------- Co-authored-by: Xuwznln <[email protected]>
feat: report publish topic when error
fix: startup slow
(cherry picked from commit 172599a)
Update conda-pack-build.yml Add create_zip_archive.py
…aracter maps to <undefined>
* Add LaiYu Liquid device integration and tests Introduce LaiYu Liquid device implementation, including backend, controllers, drivers, configuration, and resource files. Add hardware connection, tip pickup, and simplified test scripts, as well as experiment and registry configuration for LaiYu Liquid. Documentation and .gitignore for the device are also included. * feat(LaiYu_Liquid): 重构设备模块结构并添加硬件文档 refactor: 重新组织LaiYu_Liquid模块目录结构 docs: 添加SOPA移液器和步进电机控制指令文档 fix: 修正设备配置中的最大体积默认值 test: 新增工作台配置测试用例 chore: 删除过时的测试脚本和配置文件 * add * 重构: 将 LaiYu_Liquid.py 重命名为 laiyu_liquid_main.py 并更新所有导入引用 - 使用 git mv 将 LaiYu_Liquid.py 重命名为 laiyu_liquid_main.py - 更新所有相关文件中的导入引用 - 保持代码功能不变,仅改善命名一致性 - 测试确认所有导入正常工作 * 修复: 在 core/__init__.py 中添加 LaiYuLiquidBackend 导出 - 添加 LaiYuLiquidBackend 到导入列表 - 添加 LaiYuLiquidBackend 到 __all__ 导出列表 - 确保所有主要类都可以正确导入 * 修复大小写文件夹名字
* Update prcxi driver & fix transfer_liquid mix_times * fix: correct mix_times type * Update liquid_handler registry * test: prcxi.py
add auto install during one-key installation
Reviewer's GuideThis PR revises the GitHub Actions conda-pack workflow to explicitly target the “unilab” environment by adding environment flags to all install, update, and listing commands; enhances the local verification script with an argparse-driven --auto-install mode, improved type hints, and user guidance; and refactors import ordering in the main app entry point for clarity. Sequence diagram for enhanced verification with --auto-install optionsequenceDiagram
participant User as actor User
participant Script as verify_installation.py
participant Argparse as argparse
participant EnvCheck as check_environment
User->>Script: Run script with [--auto-install]
Script->>Argparse: Parse arguments
Argparse-->>Script: args.auto_install
Script->>Script: Print mode (auto-install or verify only)
Script->>EnvCheck: check_environment(auto_install=args.auto_install)
EnvCheck-->>Script: Result (pass/fail)
Script->>User: Print verification result
Note over Script,User: If missing packages and not auto-install, print hint to use --auto-install
Class diagram for updated verify_installation.py scriptclassDiagram
class verify_installation {
+main()
}
class argparse {
+ArgumentParser
+add_argument()
+parse_args()
}
class check_environment {
+check_environment(auto_install: bool, show_details: bool)
}
verify_installation --> argparse : uses
verify_installation --> check_environment : calls
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `scripts/verify_installation.py:136-140` </location>
<code_context>
def main():
"""Run all verification checks."""
# Parse command line arguments
parser = argparse.ArgumentParser(
description="Verify UniLabOS installation",
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument(
"--auto-install",
action="store_true",
help="Automatically install missing packages",
)
args = parser.parse_args()
print("=" * 60)
print("UniLabOS Installation Verification")
print("=" * 60)
if args.auto_install:
print("Mode: Auto-install missing packages")
else:
print("Mode: Verification only")
print()
all_passed = True
# Check Python version
print("Checking Python version...")
if not check_python_version():
all_passed = False
print()
# Check ROS2 rclpy
print("Checking ROS2 rclpy...")
if not check_package("rclpy", "ROS2 rclpy"):
all_passed = False
print()
# Run environment checker from unilabos
print("Checking UniLabOS and dependencies...")
try:
from unilabos.utils.environment_check import check_environment
print(f" {CHECK_MARK} UniLabOS installed")
# Check environment with optional auto-install
# Set show_details=False to suppress detailed Chinese output that may cause encoding issues
env_check_passed = check_environment(auto_install=args.auto_install, show_details=False)
if env_check_passed:
print(f" {CHECK_MARK} All required packages available")
else:
print(f" {CROSS_MARK} Some optional packages are missing")
if not args.auto_install:
print(" Hint: Run with --auto-install to automatically install missing packages")
except ImportError:
print(f" {CROSS_MARK} UniLabOS not installed")
all_passed = False
except Exception as e:
print(f" {CROSS_MARK} Environment check failed: {str(e)}")
print()
# Summary
print("=" * 60)
print("Verification Summary")
print("=" * 60)
if all_passed:
print(f"\n{CHECK_MARK} All checks passed! Your UniLabOS installation is ready.")
print("\nNext steps:")
print(" 1. Review the documentation: docs/user_guide/launch.md")
print(" 2. Try the examples: docs/boot_examples/")
print(" 3. Configure your devices: unilabos_data/startup_config.json")
return 0
else:
print(f"\n{CROSS_MARK} Some checks failed. Please review the errors above.")
print("\nTroubleshooting:")
print(" 1. Ensure you're in the correct conda environment: conda activate unilab")
print(" 2. Check the installation documentation: docs/user_guide/installation.md")
print(" 3. Try reinstalling: pip install .")
return 1
</code_context>
<issue_to_address>
**suggestion (code-quality):** Use named expression to simplify assignment and conditional ([`use-named-expression`](https://docs.sourcery.ai/Reference/Default-Rules/refactorings/use-named-expression/))
```suggestion
if env_check_passed := check_environment(
auto_install=args.auto_install, show_details=False
):
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Standardize CI workflows to run all conda and pip operations within the unilab environment, remove auto-activating base, and enhance the verify_installation.py script with a new --auto-install mode and improved argument parsing.
Enhancements:
CI:
Chores: