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

tools: add doc generate command #126

Merged
merged 3 commits into from
Aug 3, 2023
Merged

Conversation

amyXia1994
Copy link
Contributor

@amyXia1994 amyXia1994 commented Aug 1, 2023

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

cmds/kcl-go/command/cmd_doc.go
pkg/tools/doc/doc_test.go
pkg/tools/doc/kdoc.go
pkg/tools/doc/templates/schema.gotmpl
go.mod
go.sum

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

tools: add doc generate command

  • the doc subcommand is now set to Hidden and will be turned on when the feature is ready to be released
  • this PR adds the kcl-go doc generate command and implements the process from cli input to render markdown document to the target output directory. The more complete functionalities(such as starting a local documentation server, HTML/openapi format output, and the document template refine, ...) will be improved later.
  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

@amyXia1994 amyXia1994 requested a review from Peefy August 1, 2023 12:49
@coveralls
Copy link

coveralls commented Aug 1, 2023

Pull Request Test Coverage Report for Build 5746479996

  • 17 of 100 (17.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.3%) to 58.468%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/tools/doc/kdoc.go 17 100 17.0%
Totals Coverage Status
Change from base Build 5736506217: -1.3%
Covered Lines: 1923
Relevant Lines: 3289

💛 - Coveralls

@Peefy Peefy added the tool label Aug 1, 2023
pkg/tools/doc/kdoc.go Show resolved Hide resolved
pkg/tools/doc/kdoc.go Outdated Show resolved Hide resolved
cmds/kcl-go/command/cmd_doc.go Show resolved Hide resolved
cmds/kcl-go/command/cmd_doc.go Show resolved Hide resolved
Copy link
Contributor

@Peefy Peefy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Peefy Peefy merged commit be46045 into kcl-lang:main Aug 3, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2023
@amyXia1994 amyXia1994 deleted the feat/kcl-doc branch August 3, 2023 06:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support Go API for GetSchemaTypeMapping
3 participants