Skip to content

Conversation

jcwchen
Copy link
Member

@jcwchen jcwchen commented Jul 27, 2023

Description

Add auto update doc pipeline to help developers update docs: add auto update doc label in PR and it will commit updated documents in the pipeline. I am not sure how the signoff will work, but let's give it a try.

Motivation and Context

Sometimes it's painful for new developers to update a small typo in ONNX's documentation (e.g., Operators.md): they need to change the source C++ code under onnx/def directory, build onnx from source, run python onnx/defs/gen_doc.py and finally update related documents accordingly. I am thinking whether we can have an automatic pipeline to help us update files in the PR. We can set a PR label as a trigger.

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen added topic: documentation Issues related to ONNX documentation module: CI pipelines Issues related to the CI pipeline auto update doc Generate md/proto files automatically using the CI pipeline labels Jul 27, 2023
@jcwchen jcwchen requested a review from a team as a code owner July 27, 2023 22:31
jcwchen added 3 commits July 27, 2023 15:45
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen requested a review from a team as a code owner July 27, 2023 23:32
jcwchen added 6 commits July 27, 2023 17:21
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@xadupre
Copy link
Contributor

xadupre commented Jul 28, 2023

Should we disable the action checking the markdown pages are up to date?

jcwchen and others added 9 commits July 28, 2023 11:19
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jcwchen jcwchen removed the auto update doc Generate md/proto files automatically using the CI pipeline label Jul 28, 2023
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen added the auto update doc Generate md/proto files automatically using the CI pipeline label Jul 28, 2023
@jcwchen jcwchen closed this Jul 28, 2023
@jcwchen jcwchen reopened this Jul 28, 2023
jcwchen added 2 commits July 28, 2023 15:41
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen
Copy link
Member Author

jcwchen commented Jul 29, 2023

Three proposals:

  1. (What this PR did) PR still needs to update the documents accordingly. Having a automatic CI to help authors create these documents from CIs (manually trigger by the maintainers when adding a PR label). The action checking the markdown will still be needed to ensure the document is up-to-date.
  2. Don't update documents in the PR and have a CI to automatic create these documents in the main branch. No checking markdown will be needed and the author won't need to be worried about document updates. The drawback is that it's hard for PR reviewers to preview the code change in the documents.
  3. Perhaps we can still allow authors to update the document in CIs, but no matter what they will do (won't throw an markdown mismatch error if they did not update), the CI still automatic create those markdowns on the fly when merging into the main branch.

Should we disable the action checking the markdown pages are up to date?

This PR aims for 1. now and so I guess the checking markdown will still be needed.

@justinchuby
Copy link
Member

justinchuby commented Jul 29, 2023

I like 1 if we are still checking in md files in git.

@jcwchen jcwchen removed the auto update doc Generate md/proto files automatically using the CI pipeline label Aug 4, 2023
@jcwchen jcwchen added this pull request to the merge queue Aug 4, 2023
Merged via the queue into onnx:main with commit 0f1f98c Aug 4, 2023
@jcwchen jcwchen deleted the jcw/auto-doc-generation branch August 4, 2023 03:04
github-merge-queue bot pushed a commit that referenced this pull request Sep 21, 2023
### Description
<!-- - Describe your changes. -->
- Extend `onnx/backend/test/cmd_tools.py` with a new option: "diff",
which will only update the backend node test data whose script has been
updated.
- Make `auto_update_doc.yml` CI utilize "--diff" and update the backend
node test data accordingly.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
#5450 "auto update doc" was introduced
for helping users update docs like Operators.md and TestCoverage.md. It
will be also useful that the CI can help users update backend node test
as well.

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: CI pipelines Issues related to the CI pipeline topic: documentation Issues related to ONNX documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants