feat(examples): 增加媒体测试台配对入口与一键启动 - #32
Draft
Mr-KID-github wants to merge 1 commit into
Draft
Conversation
本次提交完成 Python SDK 独立媒体测试台的阶段性交付,重点是让开发者无需依赖现有桌面客户端即可启动中文测试页面并完成设备配对操作。 主要改动: - 增加 yarn sdk:lab 一键入口,自动选择项目虚拟环境或用户指定的 Python 解释器,并通过 SDK CLI 启动受管 Application。 - 在中文媒体测试台增加六位配对码输入、取消配对、连接状态与本地化错误提示。 - 通过 Daemon loopback 管理 REST 发起和取消配对,保持管理接口与业务消息路由边界。 - 补充 README、HTTP 配对接口和网页交互的 TDD 回归覆盖。 TDD / 验证: - .\.venv\Scripts\python.exe -m pytest tests\test_sdk_media_lab.py -q 通过(17 项)。 - .\.venv\Scripts\python.exe -m pytest -q 通过(完整测试,2 项跳过)。 - .\.venv\Scripts\python.exe -m mypy src\watcherobot 通过(85 个源码文件)。 - node --check examples\sdk_media_lab\web\app.js 与 tools\run-sdk-media-lab.mjs 通过。 - git diff --check 通过。 风险与后续: - 当前已确认浏览器到 Daemon 的配对请求链路可达,但 ESP32 尚未回应局域网配对广播;设备端监听与 Wi-Fi 生命周期问题留待下一阶段固件修复和 COM20 实机验证。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
独立 Python SDK 媒体测试台此前能够验证扬声器、相机和麦克风,但缺少设备配对入口,开发者必须借助其他客户端完成连接;启动命令也不够集中。本 PR 补齐本地中文测试台的配对管理与一键启动入口。
本次改动
yarn sdk:lab,自动选择项目虚拟环境或WATCHEROBOT_PYTHON指定的解释器,并通过 SDK CLI 启动受管 Application。TDD / 验证
.\.venv\Scripts\python.exe -m pytest tests\test_sdk_media_lab.py -q:17 项通过。.\.venv\Scripts\python.exe -m pytest -q:完整测试通过,2 项跳过。.\.venv\Scripts\python.exe -m mypy src\watcherobot:85 个源码文件通过。node --check examples\sdk_media_lab\web\app.js:通过。node --check tools\run-sdk-media-lab.mjs:通过。git diff --check HEAD^ HEAD:通过。文档更新
examples/sdk_media_lab/README.md,说明yarn sdk:lab、Python 解释器选择和 Daemon 生命周期。风险与注意事项
下一阶段建议