Skip to content

Conversation

@danielclow
Copy link
Contributor

use auto version detection in codeblocks

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @danielclow, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the maintainability and accuracy of the documentation by implementing an automated version detection mechanism for code examples. By replacing static version numbers with a dynamic placeholder and adding specific language tags to code blocks, the changes ensure that installation and usage instructions always reflect the current software version without requiring manual updates, thereby improving the user experience and reducing documentation overhead.

Highlights

  • Automated Versioning: Replaced hardcoded version numbers with a {{VERSION}} placeholder across various documentation files to enable automatic version detection and display.
  • Code Block Tagging: Introduced specific language tags (e.g., tsdb, tsdb-ee, tdgpt, tsdb-client) to code blocks, likely for improved syntax highlighting or processing by the documentation system.
  • Simplified Instructions: Removed redundant instructions for manually replacing version placeholders, streamlining the documentation for users.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates documentation to automatically detect and insert version numbers in code blocks, which is a great improvement for maintainability. The changes are mostly consistent and well-implemented. I've pointed out a few places where the documentation could be clearer or more consistent to avoid user confusion, particularly regarding Docker image versions in run commands and a removed piece of information about package naming.

This section describes how to install TDengine Enterprise on a bare metal machine. Note that the same instructions also apply to virtual machines.

1. Transfer the installation package for TDengine Enterprise to the target machine. The installation package is provided along with the delivery of your TDengine Enterprise license. The package name is in the format `TDengine-enterprise-<version>-Linux-<arch>.tar.gz`.
1. Transfer the installation package for TDengine Enterprise to the target machine. The installation package is provided along with the delivery of your TDengine Enterprise license.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the command in the next step shows the package name format, explicitly mentioning it in the description is clearer for the user. Consider adding the package name format back, using the new {{VERSION}} placeholder for consistency.

Suggested change
1. Transfer the installation package for TDengine Enterprise to the target machine. The installation package is provided along with the delivery of your TDengine Enterprise license.
1. Transfer the installation package for TDengine Enterprise to the target machine. The installation package is provided along with the delivery of your TDengine Enterprise license. The package name is in the format `TDengine-enterprise-{{VERSION}}-Linux-<arch>.tar.gz`.

```shell
docker run -d -p 6090:6090 -p 5000:5000 tdengine/tdengine-tdgpt:3.3.6.0
docker run -d -p 6090:6090 -p 5000:5000 tdengine/tdengine-tdgpt
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The docker run command uses the latest tag by default, which might be confusing for users who have just pulled a specific version using {{VERSION}}. This command will not use the version they just pulled. To ensure the user runs the version they intended, consider updating this command to use {{VERSION}} and also adding tdgpt to the code block's language specifier (e.g., ```shell tdgpt).


```shell
docker run -d -p 6090:6090 -p 5000:5000 -p 5001:5001 tdengine/tdengine-tdgpt-full:3.3.6.0
docker run -d -p 6090:6090 -p 5000:5000 -p 5001:5001 tdengine/tdengine-tdgpt-full
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Similar to the standard image, the docker run command for the full image uses the latest tag, while the user might have just pulled a specific version. This can be confusing. Consider updating this command to use {{VERSION}} and adding tdgpt to the code block's language specifier to ensure the user runs the version they intended to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants