Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crmsh-4.6] Dev: doc: implement help2adoc (#1374) #1380

Merged
merged 5 commits into from
Apr 11, 2024

Conversation

nicholasyang2022
Copy link
Collaborator

@nicholasyang2022 nicholasyang2022 commented Apr 7, 2024

This pull request includes:

  1. a tool help2adoc to convert the help text generated by python argparse module to asciidoc
  2. a series of helper scripts, makefiles, containers to automatic the process to combine the asciidocs generated by help2adoc and crm.8.adoc to generated a complete document

Usage:

$ cd doc/toolchain
$ podman build -t local/crmsh-doc-builder .
$ cd ..
$ make clean
$ podman run --rm -ti -v ..:/opt/crmsh local/crmsh-doc-builder:latest

The final results is doc/generated-sources/crm.8.adoc and doc/generated-sources/crm.8.html

Part of #1374.

@nicholasyang2022
Copy link
Collaborator Author

TestUtils.test_findln_by_timestamp fails in crmsh-4.6. It is unrelated to this pull request.

@nicholasyang2022 nicholasyang2022 marked this pull request as ready for review April 7, 2024 07:19
@nicholasyang2022 nicholasyang2022 changed the title Dev: doc: implement help2adoc (#1374) [crmsh-4.6] Dev: doc: implement help2adoc (#1374) Apr 7, 2024
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.84%. Comparing base (9eb2f75) to head (497303f).

Additional details and impacted files
@@            Coverage Diff             @@
##           crmsh-4.6    #1380   +/-   ##
==========================================
  Coverage      52.84%   52.84%           
==========================================
  Files             79       79           
  Lines          23949    23949           
==========================================
  Hits           12655    12655           
  Misses         11294    11294           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@liangxin1300
Copy link
Collaborator

TestUtils.test_findln_by_timestamp fails in crmsh-4.6. It is unrelated to this pull request.

Fixed in 0d66d03

convert help text generated by python's argparse to asciidoc
extracts sections needed to be generated from argparse help from tags in
crm.8.adoc and generates Makefile for building those adocs
usage: `podman run --rm -ti -v <crmsh source root dir>:/opt/crmsh local/crmsh-doc-builder:latest`
…oc (ClusterLabs#1374)

To generate a complete document, those sections generated from argparse
help needed to be included from crm.8.adoc
`make all` now generates crm.8.html.
@liangxin1300
Copy link
Collaborator

Great job!

Then the next stage will be auto-submit the web contents to crmsh.github.io, in a GH action I guess, right?
The process, please see 'Website update' section at https://github.com/ClusterLabs/crmsh/blob/master/doc/releasing-a-new-version.md

liangxin1300
liangxin1300 approved these changes Apr 9, 2024
@nicholasyang2022 nicholasyang2022 merged commit bfd7f06 into ClusterLabs:crmsh-4.6 Apr 11, 2024
31 checks passed
@nicholasyang2022 nicholasyang2022 deleted the help2adoc branch April 12, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants