diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..20a5faa --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +version: 2 +updates: +# GitHub Actions +- package-ecosystem: "github-actions" + directory: "/" + target-branch: "dev" + schedule: + interval: "weekly" + day: "monday" + time: "06:00" + open-pull-requests-limit: 5 + reviewers: + - "msgcenterpy-team" + labels: + - "dependencies" + - "github-actions" + commit-message: + prefix: "ci" + include: "scope" diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml new file mode 100644 index 0000000..fa5ada7 --- /dev/null +++ b/.github/workflows/ci-check.yml @@ -0,0 +1,52 @@ +name: CI Check + +on: + pull_request: + branches: [main, dev] + +jobs: + registry-check: + runs-on: ubuntu-latest + + defaults: + run: + shell: bash -l {0} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + miniconda-version: 'latest' + channels: conda-forge,robostack-staging,uni-lab,defaults + channel-priority: strict + activate-environment: check-env + auto-activate-base: false + auto-update-conda: false + show-channel-urls: true + + - name: Install minimal ROS dependencies + run: | + conda install ros-humble-ros-core ros-humble-std-msgs ros-humble-geometry-msgs ros-humble-control-msgs -c robostack-staging -c conda-forge + + - name: Install unilabos-msgs and project + run: | + conda install ros-humble-unilabos-msgs -c uni-lab -c robostack-staging -c conda-forge + pip install -e . + + - name: Run check mode (complete_registry) + run: | + python -m unilabos --check_mode --skip_env_check + + - name: Check for uncommitted changes + run: | + if ! git diff --exit-code; then + echo "::error::检测到文件变化!请先在本地运行 'python -m unilabos --complete_registry' 并提交变更" + echo "变化的文件:" + git diff --name-only + exit 1 + fi + echo "检查通过:无文件变化" diff --git a/unilabos/test/experiments/virtual_bench.json b/unilabos/test/experiments/virtual_bench.json new file mode 100644 index 0000000..d37fa6e --- /dev/null +++ b/unilabos/test/experiments/virtual_bench.json @@ -0,0 +1,28 @@ +{ + "nodes": [ + { + "id": "workbench_1", + "name": "虚拟工作台", + "children": [], + "parent": null, + "type": "device", + "class": "virtual_workbench", + "position": { + "x": 400, + "y": 300, + "z": 0 + }, + "config": { + "arm_operation_time": 3.0, + "heating_time": 10.0, + "num_heating_stations": 3 + }, + "data": { + "status": "Ready", + "arm_state": "idle", + "message": "工作台就绪" + } + } + ], + "links": [] +}