refactor: 将 Harness 工具移至 dev_scripts (#3)
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
generated: true (请先修改 Gitea Wiki,禁止直接编辑本文件)
|
||||
wiki_page: Local-Development-and-Verification
|
||||
wiki_url: http://ilaer.eicp.net:8418/opc/dev_harness/wiki/Local-Development-and-Verification.-
|
||||
wiki_revision: c21eb70ff584721ca899ff46701cdf0e409773bf
|
||||
synchronized_at: 2026-08-08T01:01:15Z
|
||||
wiki_revision: 43ad9c6ee3f4172059133cca05124f4018267c1e
|
||||
synchronized_at: 2026-08-08T01:16:53Z
|
||||
<!-- gitea-wiki-mirror:end -->
|
||||
|
||||
# 本地开发与验证
|
||||
@@ -35,7 +35,7 @@ synchronized_at: 2026-08-08T01:01:15Z
|
||||
### 2. 检查 Harness
|
||||
|
||||
- 目的:验证必需文件、项目档案、Wiki 映射和归档结构。
|
||||
- 命令:`python scripts/check_harness.py --strict`
|
||||
- 命令:`python dev_scripts/check_harness.py --strict`
|
||||
- 预期:输出“DevHarness 检查通过”。
|
||||
- 失败检查:按错误提示检查缺失页面、未填占位符或损坏的镜像头。
|
||||
|
||||
@@ -49,14 +49,14 @@ synchronized_at: 2026-08-08T01:01:15Z
|
||||
### 4. 对照线上 Wiki
|
||||
|
||||
- 目的:确认本地 docs 是最新镜像。
|
||||
- 命令:`python scripts/sync_wiki_docs.py --check`
|
||||
- 命令:`python dev_scripts/sync_wiki_docs.py --check`
|
||||
- 预期:所有映射显示“一致”。
|
||||
- 失败检查:先读取线上页面;确认页面名、revision、网络和 `GITEA_URL`。
|
||||
|
||||
## 常用调试方式
|
||||
|
||||
- 只检查 Python 语法:`python -m compileall -q scripts tests`。
|
||||
- 查看一个脚本帮助:`python scripts/sync_wiki_docs.py --help`。
|
||||
- 查看一个脚本帮助:`python dev_scripts/sync_wiki_docs.py --help`。
|
||||
- 查看未提交差异:`git diff --check` 和 `git diff`。
|
||||
- 查看最近提交:`git log -5 --oneline`。
|
||||
- 调试失败测试时优先运行单个测试文件,不要先修改多个模块。
|
||||
@@ -76,8 +76,8 @@ DevHarness 不使用生产数据,也不需要固定业务测试数据。命令
|
||||
|
||||
```powershell
|
||||
python -m unittest discover -s tests -v
|
||||
python scripts/check_harness.py --strict
|
||||
python scripts/sync_wiki_docs.py --check
|
||||
python dev_scripts/check_harness.py --strict
|
||||
python dev_scripts/sync_wiki_docs.py --check
|
||||
git diff --check
|
||||
git status --short
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user