GreptimeTeam / greptimedb-operator

Run GreptimeDB on Kubernetes.
Apache License 2.0
37 stars 2 forks source link

fix: format error of api reference and modify makefile target name #176

Closed zyy17 closed 2 months ago

zyy17 commented 2 months ago

Summary by CodeRabbit

coderabbitai[bot] commented 2 months ago

Walkthrough

The changes involve modifications to the GitHub Actions workflow, the Makefile, and API reference documentation. The workflow job for documentation checks has been renamed and its command updated to focus specifically on API documentation. The Makefile has seen a renaming of targets and the introduction of a new target for generating API documentation. Additionally, the API reference documentation has been enhanced with new columns for default values and validation criteria across multiple specifications.

Changes

Files Change Summary
.github/workflows/develop.yaml Renamed step from "Check docs" to "Check api docs"; updated command from make check-docs to make check-api-docs; defined shell as bash.
Makefile Renamed target from check-docs to check-api-docs; updated command to run make api-docs; added new target api-docs for generating API reference documentation. Removed old docs target.
docs/api-references/docs.md Renamed title from "API Reference" to "API References"; added "Default" and "Validation" columns to multiple specifications.
docs/api-references/template/gv_list.tpl Changed header from "GreptimeDB Operator API Reference" to "GreptimeDB Operator API References."
docs/api-references/template/type.tpl Added "Default" and "Validation" columns to member field descriptions in the API reference template.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Workflow
    participant Makefile
    participant Docs

    User->>Workflow: Trigger documentation check
    Workflow->>Makefile: Execute check-api-docs
    Makefile->>Docs: Generate API documentation
    Docs-->>Makefile: Return generated documentation
    Makefile-->>Workflow: Documentation check complete
    Workflow-->>User: Notify completion

🐰 In the garden where the bunnies play,
New docs are sprouting, hip-hip-hooray!
With checks for APIs, clear and bright,
The paths are now easier, oh what a sight!
Hopping with joy, we celebrate the change,
For every new detail, we happily arrange! 🌼


Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between bec4d4688b0837803ce7d72fb847ddf7c90b7c0b and a7b127d32ae893da2db6ac869dfd2a22a2e2df74.
Files selected for processing (5) * .github/workflows/develop.yaml (1 hunks) * Makefile (2 hunks) * docs/api-references/docs.md (34 hunks) * docs/api-references/template/gv_list.tpl (1 hunks) * docs/api-references/template/type.tpl (1 hunks)
Files skipped from review due to trivial changes (1) * docs/api-references/template/gv_list.tpl
Additional comments not posted (9)
docs/api-references/template/type.tpl (2)
`26-27`: **LGTM!** The addition of the "Default" and "Validation" columns in the table header improves the documentation by providing more comprehensive information about each member field. The changes are consistent with the existing table structure and formatting. --- `46-47`: **Looks good!** The addition of empty lines after the enum values table improves the readability and formatting of the template.
.github/workflows/develop.yaml (1)
`57-60`: **LGTM!** The changes to the job name and command align with the PR objective of focusing on API documentation checks. Explicitly setting the shell to `bash` is a good practice for clarity and compatibility.
Makefile (3)
`115-116`: **LGTM!** The target name change from `check-docs` to `check-api-docs` improves clarity by specifying that it checks API docs. --- `184-191`: **LGTM!** The new `api-docs` target consolidates API reference documentation generation using the `crd-ref-docs` tool with appropriate parameters. This change enhances the clarity and specificity of the documentation generation process. --- `118-118`: **LGTM!** The command update for the `check-api-docs` target correctly instructs users to run `make api-docs` instead of `make docs`. This aligns with the introduction of the new `api-docs` target and provides the correct guidance for generating API documentation.
docs/api-references/docs.md (3)
`34-35`: **The changes to the `ComponentSpec` table look good!** The new "Default" and "Validation" columns provide useful information in a consistent format. The minimum value validation for `replicas` is appropriate. --- `258-259`: **The `GreptimeDBClusterSpec` table updates look good.** Adding the new "Default" and "Validation" columns with empty values maintains consistency with the other updated tables in this document. --- Line range hint `1-709`: **The API reference documentation updates look great overall!** The new "Default" and "Validation" columns have been consistently added to all the relevant tables, enhancing the usefulness of the reference by providing additional important details for each field. The contents of the new columns appear to be thorough and appropriate throughout. Excellent work on maintaining consistency across all the tables and ensuring the additional information is complete and correct. These updates significantly improve the quality and usability of the API reference.
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.