[DOC] Generate gRPC API reference from the .proto files

未关闭
#2,121 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
50/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
grpc
领域
api, documentation

调研方向

Start with docs/cuopt/source/cuopt-grpc/api.rst, which lists the proto paths and is missing cuopt_remote_data.proto, and with cpp/src/grpc/GRPC_INTERFACE.md for the wire-format content. Check whether the comments on ArrayFieldId and ArrayId in cpp/src/grpc/codegen/generated/cuopt_remote_data.proto are complete enough to generate from, and pick a generator such as protoc-gen-doc for the docs build. Done means reference pages exist for the five .proto files, api.rst links them with :download: links to the protos, and GRPC_INTERFACE.md is included or linked.

由索引模型根据 Issue 内容生成。

描述

doc

Problem

Anyone writing their own client for cuopt_grpc_server has to work from the .proto files, but the published docs don't carry them:

  • docs/cuopt/source/cuopt-grpc/api.rst lists four repo paths as plain text. There are no links, downloads or includes.
  • cuopt_remote_data.proto, which holds the actual LP/MIP/QP problem fields, is not listed. It is generated from cpp/src/grpc/codegen/field_registry.yaml and committed under cpp/src/grpc/codegen/generated/.
  • The element layout and dtype of each array is documented only in comments on ArrayFieldId and the nested ArrayId enums. The docs don't show those comments.
  • The chunked-transfer wire format (raw native-endian bytes, container_field_num/container_index, NUL-joined string blobs, message-size limits) is in cpp/src/grpc/GRPC_INTERFACE.md, which the published docs don't include or link to.
  • The protos are not in the libcuopt-client wheel I checked, so users must find them in git at the matching release.

Proposal

Generate reference pages from the protos during the docs build, for example with protoc-gen-doc. The field comments then flow into the docs and can't drift from the code.

  • Generate pages for cuopt_remote_service.proto, cuopt_remote.proto, cuopt_remote_data.proto, cuopt_routing.proto and cuopt_routing_solution.proto.
  • Link them from cuopt-grpc/api.rst, and add :download: links to the .proto files.
  • Bring the content of GRPC_INTERFACE.md into the docs, or link to it.
  • Fix the file-name list in api.rst so it includes cuopt_remote_data.proto.

Notes

  • Check that the proto comments are complete enough to serve as the reference. The generated pages are only as good as those comments.
  • Shipping the protos with a release package and adding server reflection are separate options and are not part of this issue.
主要语言
Cuda
星标
1.1k
派生
249
平均合并
1 天 15 小时
30 天内合并 PR
126

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/cuopt 的其他 Issue

查看 NVIDIA/cuopt 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。