docs(workspace): document uv member workflows

This commit is contained in:
2026-07-12 14:17:59 +08:00
parent 5db68bfa0d
commit d2f9567909
3 changed files with 42 additions and 8 deletions
+12 -7
View File
@@ -117,17 +117,22 @@ npm --version
确认 Node.js/npm 满足上面的版本范围。Apple Silicon 和 Intel Mac 都应使用本机
架构的 Homebrew,不要在 Rosetta shell 与原生 shell 之间混用 Python/Node。
### 4.2 创建 Python 环境
### 4.2 同步 Python workspace
在仓库根目录执行:
```bash
uv python install 3.14
uv venv --python 3.14
source .venv/bin/activate
python --version
uv pip install -e .
uv pip install "pytest>=8.3.0"
uv sync --locked --all-packages
uv run --package device-agent-runtime python --version
uv run --package device-cloud-platform python -c "import cloud"
```
uv 会在仓库根目录管理 `.venv`,共享 `uv.lock` 同时锁定本地 Runtime 和 cloud
platform 两个 Python member。运行完整的非实机测试使用:
```bash
uv run --all-packages pytest -m "not integration"
```
如果 Apple Silicon 上安装 `paddleocr` 或其底层推理依赖失败,可以先安装不带 OCR
@@ -257,7 +262,7 @@ PY
验证通过后,可以运行仓库的实机 integration test:
```bash
pytest -m integration tests/test_wda_integration.py -v
uv run --package device-agent-runtime pytest -m integration tests/test_wda_integration.py -v
```
该测试只从环境变量读取 server URL、UDID 和 device name,不传签名 capabilities,