已合并
refactor: 消减第三方依赖并补充编译并发选项文档 #656
songkai111创建于 7月20日
refactor: 消减第三方依赖并补充编译并发选项文档 #656
已合并
songkai111创建于 7月20日
songkai111成员
7月20日

描述

减少项目不必要的第三方依赖,并补充编译并发选项的文档说明。

第三方依赖消减

  • install_deps.sh 中移除 install_googletest 函数(49行),不再作为项目必装依赖
  • 删除 requirements.txt 文件(仅含 pyyaml),不再要求用户手动安装
  • 同步移除中英文文档及目录结构描述中的 requirements.txt 相关内容

编译并发文档补充

  • docs/QUICKSTART.md 中为 build.sh 命令新增 --pkg 参数和 -j{n} 编译线程数选项的说明
  • 补充示例命令,帮助用户通过 -j 参数加速编译

关联的Issue

https://gitcode.com/cann/opbase/issues/275
https://gitcode.com/cann/opbase/issues/274

测试

  • 验证 install_deps.sh 在不包含 googletest 安装逻辑后仍可正常运行
  • 验证删除 requirements.txt 后编译流程不受影响

文档更新

  • docs/QUICKSTART.md:移除 requirements.txt 安装命令,新增 build.sh 并发编译参数说明
  • docs/en/install/quick_install.md:移除 requirements.txt 安装步骤
  • docs/zh/install/quick_install.md:移除 requirements.txt 安装步骤
  • docs/zh/appendix/dir_structure.md:移除 requirements.txt 文件说明

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 songkai111 的贡献)
atomgit-bot
atomgit-bot
7月20日 评论:

变更摘要

本次 PR 主要围绕第三方依赖的消减和编译并发相关文档的补充。核心改动是从 install_deps.sh 中移除了 install_googletest 函数的定义及其在 main() 中的调用,减少了安装脚本中对 Google Test 源码编译安装的依赖。此外还包括其他依赖消减和文档层面的补充。

主要改动

  • 移除 install_googletest 函数:从 install_deps.sh 中完整删除了约 50 行的 install_googletest 函数定义,该函数原本负责从 GitHub 下载 Google Test 1.11.0 源码并进行 cmake 编译安装到 /usr/local
  • main() 中取消 googletest 安装调用:在 install_deps.shmain() 函数中移除了对 install_googletest 的调用,使依赖安装流程不再自动安装 Google Test。
  • 第三方依赖消减:PR 描述表明对其他第三方依赖也进行了消减处理(涉及其余 5 个变更文件),共计删除 75 行、新增 9 行。
  • 编译并发文档补充:PR 标题提及了对编译并发相关文档内容的补充更新。
likedislike
atomgit-bot
atomgit-bot
7月20日 评论:

代码审查

All five changed files have been reviewed. Here's the summary:


审查总结

文件 审查结果
docs/QUICKSTART.md 发现 1 个问题(P3:--pkg 空操作标志)
docs/en/install/quick_install.md 无独立问题(仅移除了 pip3 install -r requirements.txt,与 requirements.txt 删除一致)
docs/zh/appendix/dir_structure.md 无独立问题(仅移除了 requirements.txt 条目,与文件删除一致)
docs/zh/install/quick_install.md 无独立问题(仅移除了 pip3 install -r requirements.txt,与 requirements.txt 删除一致)
install_deps.sh 发现 1 个问题(P3:googletest 移除后文档未同步更新)

问题统计: P0: 0 · P1: 0 · P2: 0 · P3: 2

整体风险判断:低。 两个发现均为文档层面的不一致问题,不影响代码正确性、构建或运行时行为。requirements.txt 的删除经过验证(项目无 pyyaml 依赖),install_googletest 的移除也有 cmake 构建系统兜底(自动下载 googletest),核心变更方向合理。建议在合入前同步更新 EN/ZH 快速安装文档中的 googletest 说明。

⚠️ 已识别出整体风险,但无法提取行内评论,请参考整体评估。

likedislike
CANN-robotCANN-robot成员
7月20日 添加了label:cann-cla/no
CANN-robot
CANN-robot成员
7月20日 评论:

CLA Signature Guide

@songkai111 , thanks for your pull request.

The following commit(s) have not signed Contributor License Agreement (CLA).

Commit Reason
9b45ee7e fix: 第三方依赖消减 & 编... the email is not signed for CLA! please check if it is correct and the same as your signed email.

If you need to sign CLA, you can click here to sign the CLA.

If you need to check if the email is set up correctly, you can click here to do it in the FAQs.

After signing the CLA or updating the email, you must comment /check-cla to check the CLA status again.

likedislike
CANN-robot
CANN-robot成员
7月20日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/opbase 张磊, wangrui_ (2/2) 张磊 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

songkai111, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
7月20日 将zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,llimwang,gubaocheng设为评审人
此处折叠了6条事件消息 查看更多
CANN-robotCANN-robot成员
7月20日 删除了label:stat/needs-squash
CANN-robot
CANN-robot成员
7月20日 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): stat/needs-squash.

likedislike
songkai111成员
7月20日 评论:

compile

likedislike
Ssongkai111成员
7月20日 强制推送  1 个提交:27ea94e0-fix: 第三方依赖消减 & 编译并发文档补充
songkai111成员
7月20日 评论:

/check-cla

likedislike
CANN-robotCANN-robot成员
7月20日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月20日 评论:

流水线任务触发成功
任务链接 [b80b0be34b17432089506feff5944bc2][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ❌ FAILED >>>>>
antipoison ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
precommit ✅ SUCCESS >>>>>
likedislike
Ssongkai111成员
7月20日 强制推送  1 个提交:d8d10016-fix: 第三方依赖消减 & 编译并发文档补充
CANN-robotCANN-robot成员
7月20日 删除了label:cann-cla/no
CANN-robotCANN-robot成员
7月20日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
7月20日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月20日 添加了label:ci-pipeline-failed
CANN-robot
CANN-robot成员
7月20日 评论:
流水线 PR-pipeline_cann_opbase#1509 [ commitID:1077df7a ] 运行失败
⚠️ 流水线执行结果已过期,当前 PR 最新 commit 为 d8d10016,请重新运行流水线
likedislike
Ssongkai111成员
7月20日 修改标题为 “refactor: 消减第三方依赖并补充编译并发选项文档”,原标题为“fix: 第三方依赖消减 & 编译并发文档补充”
Ssongkai111成员
7月20日 修改了pull request 的描述
songkai111成员
7月20日 评论:

compile

likedislike
CANN-robotCANN-robot成员
7月20日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
7月20日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月20日 评论:

流水线任务触发成功
任务链接 [f119b19b2ba84deca6bfc30f3adb0c17][流水线指导]

任务名称状态日志下载链接
codecheck ❌ FAILED None
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS None
precommit ✅ SUCCESS >>>>>
likedislike
Ssongkai111成员
7月20日 修改了pull request 的描述
CANN-robotCANN-robot成员
7月20日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月20日 添加了label:ci-pipeline-failed
songkai111成员
7月20日 评论:

compile

likedislike
CANN-robotCANN-robot成员
7月20日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
7月20日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月20日 评论:

流水线任务触发成功
任务链接 [0754da346c2340509ee5455072387dba][流水线指导]

任务名称状态日志下载链接
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
precommit ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>

[2026-07-20 17:41:03]    CI执行结束

likedislike
CANN-robotCANN-robot成员
7月20日 添加了label:api-check-pass
CANN-robotCANN-robot成员
7月20日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月20日 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
7月20日 评论:
流水线 PR-pipeline_cann_opbase#1513 [ commitID:d8d10016 ] 已完成
likedislike
RuiWang_成员
7月20日 评论:

/lgtm

likedislike
zl_hw成员
7月20日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
7月20日 添加了label:lgtmapproved
CANN-robotCANN-robot成员
7月20日 关闭了关联的issue
CANN-robotCANN-robot成员
7月20日 合入了pull request