多pipeline同步支持
This commit is contained in:
+32
-35
@@ -1,44 +1,41 @@
|
||||
# 脚本目录
|
||||
|
||||
## 文件说明
|
||||
本目录当前主要放两类脚本:
|
||||
- 自动化测试编排脚本
|
||||
- 本地数据集构建/分析脚本
|
||||
|
||||
### test_api_sync.py
|
||||
主要的API数据同步测试脚本。
|
||||
旧的 `scripts/test_api_sync.py` 与 `API_SYNC_GUIDE.md` 已不存在,不再作为当前入口。
|
||||
|
||||
**功能:**
|
||||
- 从远程API获取所有GET/LIST接口数据
|
||||
- 自动分页获取全量数据
|
||||
- 保存为JSONL格式到 `remote_datasource` 目录
|
||||
- 支持单项目模式或全量同步
|
||||
## 当前常用入口
|
||||
|
||||
### 自动化测试
|
||||
- `scripts/auto_test_init.py`
|
||||
- 初始化 auto-test 运行环境,负责清理状态、恢复测试数据、拉起后端。
|
||||
- `scripts/auto_test_clear.py`
|
||||
- 清理 auto-test 运行环境。
|
||||
- `scripts/run_auto_test.py`
|
||||
- 运行指定 domain 的多轮自动回归并输出报告。
|
||||
- `scripts/run_auto_test_all_domains.py`
|
||||
- 聚合运行多个 domain 的自动回归。
|
||||
- `scripts/run_large_scale_auto_test.py`
|
||||
- 大规模自动回归入口。
|
||||
|
||||
### 数据集与分析
|
||||
- `scripts/build_filtered_datasource_for_projects.py`
|
||||
- 从完整 datasource 中抽取指定项目,生成可复现的精简 JSONL 数据集。
|
||||
- `scripts/analyze_state_signatures.py`
|
||||
- 分析状态签名与差异。
|
||||
|
||||
## 推荐命令
|
||||
|
||||
这些命令目前可直接使用:
|
||||
|
||||
**运行方式:**
|
||||
```bash
|
||||
python scripts/test_api_sync.py
|
||||
python scripts/build_filtered_datasource_for_projects.py --help
|
||||
python scripts/run_auto_test.py --help
|
||||
```
|
||||
|
||||
**数据类型覆盖:**
|
||||
- 基础数据: company, user, supplier, project
|
||||
- 项目数据: contract, construction_task, material, contract_settlement, personnel
|
||||
- 项目扩展: preparation, production, lar, units (从all_info获取)
|
||||
- 明细数据: construction_task_detail, material_detail, contract_settlement_detail, personnel_detail
|
||||
## 进一步说明
|
||||
|
||||
**配置说明:**
|
||||
在文件中修改以下配置:
|
||||
```python
|
||||
BASE_URL = "http://localhost:8000/api/third/v2"
|
||||
UID = "your-uid"
|
||||
SECRET_KEY = "your-secret-key"
|
||||
TARGET_PROJECT_ID = "xxx-xxx-xxx" # 单项目模式,设为None则全量同步
|
||||
```
|
||||
|
||||
## 输出结果
|
||||
|
||||
数据保存在 `remote_datasource/datasource/` 目录下:
|
||||
- `company_1.jsonl` - 公司数据
|
||||
- `user_1.jsonl` - 用户数据
|
||||
- `project_1.jsonl` - 项目数据
|
||||
- ... 其他数据类型
|
||||
|
||||
## 更多文档
|
||||
|
||||
详细文档请查看项目根目录的 [API_SYNC_GUIDE.md](../API_SYNC_GUIDE.md)
|
||||
- 自动化测试总览:`docs/testing_guide.md`
|
||||
- 大规模自动回归方法:`docs/auto_test_spec/agent_auto_test_method.md`
|
||||
|
||||
Reference in New Issue
Block a user