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

オープン
#2,121 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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
フォーク
255
平均マージ
1日 11時間
マージ済み PR(30日)
123

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/cuopt のほかの issue

NVIDIA/cuopt の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。