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

fix: Cosmos-SDK & IBC swagger-code generation #192

Merged
merged 6 commits into from
Jun 3, 2024

Conversation

shifty11
Copy link
Contributor

@shifty11 shifty11 commented May 30, 2024

Please pull code and run make proto-gen to verify that it runs properly on your machines.

Summary by CodeRabbit

  • Documentation

    • Renamed parameters in various query operations for better clarity and specificity.
  • Chores

    • Updated Makefile to enhance proto-gen target with new volume mounts for cosmos-sdk and ibc-go.
    • Refined proto/generate.sh script for improved handling of proto files and generation of documentation.
  • Bug Fixes

    • Addressed issues related to Cosmos-SDK & IBC swagger-code generation.

Copy link

coderabbitai bot commented May 30, 2024

Walkthrough

Recent changes focus on refining the Cosmos SDK integration. Updates include modifying the Makefile for better proto file handling, renaming parameters in docs/config.json for clarity, and enhancing the proto/generate.sh script for more efficient proto file processing. These improvements streamline the development process and improve documentation accuracy.

Changes

File Change Summary
Makefile Updated proto-gen target to add volume mounts for cosmos-sdk and ibc-go from installed Go modules.
docs/config.json Renamed various parameters in query operations for better specificity across different Cosmos modules.
proto/generate.sh Refined handling of proto files, paths, and generation processes for gogo proto files, modules, and docs.
CHANGELOG.md Documented bug fixes related to Cosmos-SDK & IBC swagger-code generation in pull request #192.

Poem

In the realm of code so bright,
Cosmos modules take their flight.
With paths refined and names anew,
Proto files now flow right through.
Swagger docs and volumes mount,
Progress made, a great amount.
Hopping onward, swift and keen,
Code evolves, a wondrous scene.


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>.
    • 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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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 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 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.

Copy link

@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: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0823dd8 and 456602d.

Files selected for processing (3)
  • Makefile (1 hunks)
  • docs/config.json (1 hunks)
  • proto/generate.sh (2 hunks)
Files skipped from review due to trivial changes (1)
  • Makefile
Additional comments not posted (4)
proto/generate.sh (4)

7-7: Ensure the use of find ... -print0 | xargs -0 for robust handling of filenames with special characters.


10-10: The approach to create a comma-separated list of module.proto files is consistent with the previous change, ensuring uniformity in handling file lists.


27-27: Verify that the buf generate command correctly handles the comma-separated list of proto files.


48-48: Confirm that the exclusion of problematic files (query.proto and service.proto) from swagger generation is correctly implemented.

mbreithecker
mbreithecker previously approved these changes May 31, 2024
Copy link

@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: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 456602d and 656bc3e.

Files selected for processing (4)
  • CHANGELOG.md (1 hunks)
  • Makefile (1 hunks)
  • docs/config.json (1 hunks)
  • proto/generate.sh (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • Makefile
  • docs/config.json
Additional context used
Shellcheck
proto/generate.sh

[warning] 58-58: In POSIX sh, [[ ]] is undefined.


[style] 58-58: Use -n instead of ! -z.

LanguageTool
CHANGELOG.md

[style] ~101-~101: Using many exclamation marks might seem excessive (in this case: 24 exclamation marks for a text that’s 11778 characters long)
Context: ...de auth module. ### Client Breaking - ! (x/stakers) [#46](https://github.com/...

Additional comments not posted (3)
proto/generate.sh (2)

8-8: The changes to proto_list and module_list improve the robustness of file handling by correctly managing filenames with special characters.

Also applies to: 11-11


28-28: Proper quoting of $proto_list in the buf generate command enhances the handling of paths with spaces.

CHANGELOG.md (1)

41-41: The changelog entry correctly documents the improvements made in the Cosmos-SDK & IBC swagger-code generation.

Copy link

@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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 656bc3e and c984834.

Files selected for processing (1)
  • Makefile (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • Makefile

@mbreithecker mbreithecker changed the title fix: cosmos-sdk swagger-code generation fix: Cosmos-SDK & IBC swagger-code generation Jun 3, 2024
@mbreithecker mbreithecker merged commit 87f6718 into main Jun 3, 2024
5 checks passed
@mbreithecker mbreithecker deleted the rapha/fix-swagger-generation branch June 3, 2024 09:13
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