docs: 命令入口改为 harness.py 子命令 (#23)

ila
2026-08-18 21:33:53 +08:00
parent 5c8801853c
commit b519184a1f
+5 -5
@@ -27,7 +27,7 @@
### 2. 检查 Harness
- 目的:验证必需文件、项目档案、Wiki 映射和归档结构。
- 命令:`python dev_scripts/check_harness.py --strict`
- 命令:`python dev_scripts/harness.py check --strict`
- 预期:输出“DevHarness 检查通过”。
- 失败检查:按错误提示检查缺失页面、未填占位符或损坏的镜像头。
@@ -41,14 +41,14 @@
### 4. 对照线上 Wiki
- 目的:确认本地 docs 是最新镜像。
- 命令:`python dev_scripts/sync_wiki_docs.py --check`
- 命令:`python dev_scripts/harness.py sync --check`
- 预期:所有映射显示“一致”。
- 失败检查:先读取线上页面;确认页面名、revision、网络和 `GITEA_URL`。
## 常用调试方式
- 只检查 Python 语法:`python -m compileall -q dev_scripts tests`。
- 查看一个脚本帮助:`python dev_scripts/sync_wiki_docs.py --help`。
- 查看一个脚本帮助:`python dev_scripts/harness.py sync --help`。
- 查看未提交差异:`git diff --check` 和 `git diff`。
- 查看最近提交:`git log -5 --oneline`。
- 调试失败测试时优先运行单个测试文件,不要先修改多个模块。
@@ -68,8 +68,8 @@ DevHarness 不使用生产数据,也不需要固定业务测试数据。命令
```powershell
python -m unittest discover -s tests -v
python dev_scripts/check_harness.py --strict
python dev_scripts/sync_wiki_docs.py --check
python dev_scripts/harness.py check --strict
python dev_scripts/harness.py sync --check
git diff --check
git status --short
```