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

docs: tooling #22049

Merged
merged 1 commit into from
Oct 3, 2024
Merged

docs: tooling #22049

merged 1 commit into from
Oct 3, 2024

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Oct 2, 2024

Description

ref #21429


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • Documentation
    • Updated the README.md for the client/v2 package to improve structure and clarity.
    • Revised 00-protobuf.md to clarify Protocol Buffers usage and updated references.
    • Enhanced Confix documentation with new installation instructions and directory structure changes.
    • Improved organization of the cosmovisor README's table of contents for better readability.
  • Bug Fixes
    • Adjusted upgrade paths in upgrades.go files to reflect new versioning schemes.

@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Oct 2, 2024
Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

📝 Walkthrough

Walkthrough

The pull request includes updates to various documentation files and code related to versioning and configuration management. Key changes involve restructuring the README.md files for the client/v2, Confix, and cosmovisor tools for improved clarity and organization. Additionally, the 00-protobuf.md file has been revised to update references and descriptions regarding Protocol Buffers. Versioning information in simapp/upgrades.go and simapp/v2/upgrades.go has been updated to reflect new upgrade paths, while no alterations were made to the functionality of the code.

Changes

File Change Summary
client/v2/README.md Updated structure and headings for clarity; restructured sections; added conventions for Cobra commands.
docs/build/tooling/00-protobuf.md Updated references and descriptions regarding Protocol Buffers; modified links and clarified content.
simapp/upgrades.go Updated upgrade versioning from v0.50.x to v0.52.x to v0.54.x; changed UpgradeName constant.
simapp/v2/upgrades.go Updated upgrade versioning from v0.50.x to v0.52.x to v2; changed UpgradeName constant.
tools/confix/README.md Clarified installation instructions; updated directory structure for SDK configurations; added compatibility entry.
tools/cosmovisor/README.md Reorganized and reformatted the table of contents for improved clarity.

Possibly related PRs

Suggested labels

C:Cosmovisor, C:x/upgrade, C:Store, Type: ADR

Suggested reviewers

  • tac0turtle
  • sontrinh16
  • facundomedica

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added C:CLI C:Cosmovisor Issues and PR related to Cosmovisor C:Confix Issues and PR related to Confix labels Oct 2, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (6)
simapp/v2/upgrades.go (2)

17-22: Approve version update with minor suggestion

The update to the version numbers in the comments and the UpgradeName constant correctly reflects the upgrade from v0.52.x to v2. This aligns with the PR objectives and indicates a significant update in the SDK version.

Consider slightly rewording the comment for clarity:

- // from v0.52.x to v2
+ // from v0.52.x to v2.x

This change would make it explicit that v2 refers to the entire v2.x series, which is typically how semantic versioning is interpreted.


Leftover References to Old Upgrade Name

A remaining reference to "v050-to-v051" was found in the codebase:

  • tests/systemtests/upgrade_test.go: upgradeName = "v050-to-v051"
🔗 Analysis chain

Line range hint 24-52: Verify upgrade handler consistency

The RegisterUpgradeHandlers function remains unchanged except for using the updated UpgradeName constant. This is correct and maintains consistency with the version update.

To ensure all references to the upgrade name have been updated, please run the following command:

This will help verify that no old references to the previous upgrade name remain in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to the old upgrade name
rg --type go "v050-to-v051" .

Length of output: 104

client/v2/README.md (4)

Line range hint 5-19: LGTM! Title and introduction improved.

The restructuring of the title and introduction provides a clearer hierarchy and better introduces the AutoCLI concept. This change improves the overall organization of the document.

Consider adding a brief explanation of what "Client/v2" encompasses beyond AutoCLI, if applicable, to give readers a complete picture of the package's scope.


Line range hint 37-76: LGTM! Application Wiring section improved with clear steps and example.

The restructured Application Wiring section now provides a more straightforward guide for implementing AutoCLI. The added tip about AutoCLI being additive is particularly useful for developers considering integration with existing applications.

Consider adding a brief explanation or link to more information about the depinject mentioned in step 3, as some readers might not be familiar with this concept.


Line range hint 115-239: LGTM! Comprehensive guide on customizing AutoCLI.

The expanded Module wiring & Customization section now provides a thorough explanation of how to tailor AutoCLI to specific needs. The new subsections on Specifying Subcommands, Positional Arguments, and Customising Flag Names offer valuable insights into fine-tuning the CLI interface.

The addition of conventions for the Use field in Cobra is particularly helpful for maintaining consistency across commands.

Consider adding a brief example or two for the "Conventions for the Use field in Cobra" section to illustrate how these conventions look in practice.


Line range hint 250-309: LGTM! Valuable addition of Off-Chain functionality.

The new Off-Chain section introduces important functionality for signing and verifying files off-chain. The examples provided for the sign-file command with different encoding options are clear and helpful.

Consider adding a brief explanation of why one might choose to use off-chain signing and verification, to provide context for when this functionality would be useful.

🧰 Tools
🪛 Markdownlint

281-281: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5c4f4ac and 7ca53f1.

📒 Files selected for processing (6)
  • client/v2/README.md (16 hunks)
  • docs/build/tooling/00-protobuf.md (3 hunks)
  • simapp/upgrades.go (1 hunks)
  • simapp/v2/upgrades.go (1 hunks)
  • tools/confix/README.md (4 hunks)
  • tools/cosmovisor/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • simapp/upgrades.go
  • tools/cosmovisor/README.md
🧰 Additional context used
📓 Path-based instructions (4)
client/v2/README.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/build/tooling/00-protobuf.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

simapp/v2/upgrades.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

tools/confix/README.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

🪛 LanguageTool
client/v2/README.md

[style] ~19-~19: This phrase is redundant (‘I’ stands for ‘interface’). Use simply “CLI”.
Context: ...s. This means that you can easily add a CLI interface to your application without having to m...

(ACRONYM_TAUTOLOGY)

docs/build/tooling/00-protobuf.md

[uncategorized] ~87-~87: Possible wrong verb form detected. Did you mean “been” or “being”?
Context: ... to the version of the Cosmos SDK being are used. ```go reference https://github....

(BE_WITH_WRONG_VERB_FORM)

tools/confix/README.md

[grammar] ~43-~43: Did you mean “fewer”? The noun “features” is countable.
Context: ...ix directly in the application can have less features than using it standalone. This...

(FEWER_LESS)

🔇 Additional comments (13)
simapp/v2/upgrades.go (1)

Line range hint 1-52: Summary of changes and impact

The changes in this file successfully update the upgrade process from v0.52.x to v2. The modifications include:

  1. Updating version references in comments and the UpgradeName constant.
  2. Maintaining the existing upgrade handler logic, which remains appropriate for the new version.

These changes align with the PR objectives and ensure that the upgrade process is correctly configured for the transition to v2 of the Cosmos SDK.

The file adheres to the Uber Golang style guide as required by the coding guidelines.

tools/confix/README.md (5)

26-26: Update in root command initialization noted

The change from initRootCmd(rootCmd, encodingConfig) to initRootCmd(rootCmd, moduleManager) has been correctly documented. This is an important update for users implementing Confix in their applications.


141-141: Updated path for default SDK configurations

The change in the directory structure for default SDK configurations from data/v0.XX-app.toml to data/vXX-app.toml has been correctly documented. This simplification in version numbering is beneficial for maintainers.


152-152: New compatibility entry added

The addition of the compatibility entry for SDK version "v2" is helpful for users. It clearly indicates that Confix version v0.2.x should be used with SDK v2.


156-156: Clarification in credits section

The modification in the credits section provides more accurate historical context by specifying that CometBFT's implementation of Confix was "never released". This is a valuable clarification for users interested in the project's background.


Line range hint 1-156: Overall documentation update is comprehensive and well-structured

The changes to the Confix documentation are thorough and provide valuable updates across various sections. The modifications include:

  1. Updated installation instructions
  2. New usage tips
  3. Changes to the maintainer guidelines
  4. Added compatibility information
  5. Clarified project credits

These updates enhance the document's usefulness for both users and maintainers of the Confix tool. The consistent structure and clear explanations contribute to a high-quality documentation update.

🧰 Tools
🪛 LanguageTool

[grammar] ~43-~43: Did you mean “fewer”? The noun “features” is countable.
Context: ...ix directly in the application can have less features than using it standalone. This...

(FEWER_LESS)

docs/build/tooling/00-protobuf.md (4)

7-9: LGTM: Updated Protocol Buffers usage description and Docker image version

The changes provide more accurate and up-to-date information about the usage of Protocol Buffers in Cosmos SDK and the Docker image version used for generating proto files. The wording is clear and concise.


14-14: LGTM: Updated link to latest version of protobuf.mk

The link to the protobuf.mk file has been updated to reference v0.52.0-beta.1, ensuring that the documentation points to the latest version of the file. This change helps keep the documentation current and accurate.


17-17: LGTM: Updated link and clarified description of protocgen.sh

The link to the protocgen.sh script has been updated to v0.52.0-beta.1, and the description has been enhanced to specify that it generates protobuf files via buf. These changes improve the accuracy and clarity of the documentation.


35-37: LGTM: Improved description of proto/ directory and module proto files

The description of the proto/ directory has been refined to clarify that it contains all global protobuf files. Additionally, the new information about module proto files being located in their respective module directories (x/{moduleName}/proto) provides a more complete picture of the project structure. These changes enhance the overall clarity and accuracy of the documentation.

client/v2/README.md (3)

Line range hint 21-35: LGTM! Overview section enhanced with valuable details.

The expanded Overview section now provides a more comprehensive explanation of AutoCLI's functionality. The added example of how commands are generated from protobuf definitions is particularly helpful for understanding the practical application of AutoCLI.

🧰 Tools
🪛 LanguageTool

[style] ~19-~19: This phrase is redundant (‘I’ stands for ‘interface’). Use simply “CLI”.
Context: ...s. This means that you can easily add a CLI interface to your application without having to m...

(ACRONYM_TAUTOLOGY)


Line range hint 78-114: LGTM! Valuable additions on Keyring and Signing.

The new sections on Keyring and Signing provide crucial information about AutoCLI's interaction with the keyring for key name resolution and transaction signing. This information is essential for developers to understand the security model and capabilities of AutoCLI.

The tip about AutoCLI's improved UX for key name resolution is particularly helpful.


Line range hint 240-249: LGTM! Improved Summary with additional tool information.

Moving the Summary to the end of the document provides a logical conclusion to the README. The addition of information about hubl is valuable, as it introduces readers to a complementary tool that can further enhance their CLI experience with Cosmos SDK-based blockchains.

Comment on lines +42 to +45
:::tip
Using confix directly in the application can have less features than using it standalone.
This is because confix is versioned with the SDK, while `latest` is the standalone version.
```
:::
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

New tip about Confix usage added

The added tip provides valuable information about potential feature differences between standalone and integrated usage of Confix. This helps users make informed decisions about how to use the tool.

However, there's a minor grammatical issue in the tip.

Consider revising the first sentence of the tip:

- Using confix directly in the application can have less features than using it standalone.
+ Using confix directly in the application can have fewer features than using it standalone.

The word "fewer" is more appropriate here as "features" is a countable noun.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
:::tip
Using confix directly in the application can have less features than using it standalone.
This is because confix is versioned with the SDK, while `latest` is the standalone version.
```
:::
:::tip
Using confix directly in the application can have fewer features than using it standalone.
This is because confix is versioned with the SDK, while `latest` is the standalone version.
:::
🧰 Tools
🪛 LanguageTool

[grammar] ~43-~43: Did you mean “fewer”? The noun “features” is countable.
Context: ...ix directly in the application can have less features than using it standalone. This...

(FEWER_LESS)

Comment on lines +87 to +88
It is advised to use a tagged version of the buf modules corresponding to the version of the Cosmos SDK being are used.

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Approve recommendation, but fix grammatical error

The addition of the recommendation to use tagged versions of buf modules corresponding to the Cosmos SDK version is valuable. However, there's a grammatical error in the sentence that needs to be corrected.

Please apply the following change to fix the grammatical error:

-It is advised to use a tagged version of the buf modules corresponding to the version of the Cosmos SDK being are used. 
+It is advised to use a tagged version of the buf modules corresponding to the version of the Cosmos SDK being used. 
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
It is advised to use a tagged version of the buf modules corresponding to the version of the Cosmos SDK being are used.
It is advised to use a tagged version of the buf modules corresponding to the version of the Cosmos SDK being used.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~87-~87: Possible wrong verb form detected. Did you mean “been” or “being”?
Context: ... to the version of the Cosmos SDK being are used. ```go reference https://github....

(BE_WITH_WRONG_VERB_FORM)

client/v2/README.md Show resolved Hide resolved
@julienrbrt julienrbrt added this pull request to the merge queue Oct 3, 2024
Merged via the queue into main with commit 3a5a619 Oct 3, 2024
81 of 83 checks passed
@julienrbrt julienrbrt deleted the julien/docs-tooling branch October 3, 2024 05:09
mergify bot pushed a commit that referenced this pull request Oct 3, 2024
(cherry picked from commit 3a5a619)

# Conflicts:
#	tools/cosmovisor/README.md
@mergify mergify bot mentioned this pull request Oct 3, 2024
12 tasks
julienrbrt added a commit that referenced this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release C:CLI C:Confix Issues and PR related to Confix C:Cosmovisor Issues and PR related to Cosmovisor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants