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

Use constants for tags and versions #366

Merged
merged 2 commits into from
May 7, 2024
Merged

Use constants for tags and versions #366

merged 2 commits into from
May 7, 2024

Conversation

yarikbratashchuk
Copy link
Contributor

@yarikbratashchuk yarikbratashchuk commented May 7, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new constants file to manage version tags and constants across the platform.
    • Updated tutorials to dynamically use the latest versions and tags from the new constants file, ensuring the most recent information is always presented.
  • Documentation

    • Enhanced the tutorial documentation with dynamic links and version control for better user guidance and consistency.

@yarikbratashchuk yarikbratashchuk requested a review from jcstein May 7, 2024 12:39
Copy link
Contributor

coderabbitai bot commented May 7, 2024

Walkthrough

In this update, a new constants.js file is introduced to manage versioning across tutorials, ensuring dynamic references for various tools and libraries. This centralization streamlines updates and enhances tutorial maintenance by reducing manual interventions and potential errors.

Changes

Files Change Summary
.../constants.js Introduced frozen constants for tool and library versions and tags.
tutorials/gm-world.md Utilized dynamic versioning for Go and Windows installation, updated links.
tutorials/quick-start.md, tutorials/wordle.md Imported constants, updated scripts and commands to use dynamic versions.

🐰✨
A hop of joy, a leap so high,
For code that changes, under the sky.
No more hardcodes, in our sight,
Constants lead us, oh so right!
Cheers to updates, clean and bright! 🌟
🐰💻


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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
Contributor

github-actions bot commented May 7, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-05-07 14:57 UTC

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

Out of diff range and nitpick comments (5)
tutorials/quick-start.md (1)

Line range hint 51-51: Consider reducing the use of multiple exclamation marks in the documentation to maintain a professional tone.

tutorials/gm-world.md (2)

Line range hint 64-64: Consider rephrasing to avoid wordiness: "In order to run it you need to have the jq command line tool installed." could be simplified to "You need to install the jq command line tool to run it."


Line range hint 140-140: Consider adding a comma for clarity: "For convenience, we export two of our keys like this:"

tutorials/wordle.md (2)

40-40: Consider rephrasing to avoid wordiness: "You do not have to do those guides in order to follow this Wordle tutorial, but doing so helps you understand the architecture of Cosmos-SDK better." could be simplified to "You don't need to complete those guides to follow this tutorial, but they help you understand the Cosmos-SDK architecture better."


Line range hint 82-82: Consider using a more formal alternative to 'amazing' to maintain a professional tone in the documentation. For example, "Ignite is an exceptional CLI tool to help us get started building our own blockchains."

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 50c935b and b295529.
Files selected for processing (4)
  • .vitepress/constants/constants.js (1 hunks)
  • tutorials/gm-world.md (3 hunks)
  • tutorials/quick-start.md (2 hunks)
  • tutorials/wordle.md (4 hunks)
Additional Context Used
LanguageTool (20)
tutorials/gm-world.md (4)

Near line 64: Consider a shorter alternative to avoid wordiness.
Context: ... script in a new terminal: ::: warning In order to run it you need to have the jq command ...


Near line 65: Possible missing comma found.
Context: ... terminal: ::: warning In order to run it you need to have the jq command line to...


Near line 140: A comma is probably missing here.
Context: ...1lv8c1FWhLpqP"}' type: local ``` For convenience we export two of our keys like this: `...


Near line 147: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... just want to submit transaction from a high level perspective): ```bash gmd tx bank send...

tutorials/quick-start.md (1)

Near line 51: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 905 characters long)
Context: ...seful applications on Rollkit. Good luck!

tutorials/wordle.md (15)

Near line 40: Consider a shorter alternative to avoid wordiness.
Context: ...ld) You do not have to do those guides in order to follow this Wordle tutorial, but doing ...


Near line 57: Possible missing comma found.
Context: ...ght means it’s a correct letter for the Wordle included in the wrong position. A grey ...


Near line 82: Consider using a more formal and expressive alternative to ‘amazing’.
Context: ...--> ### 🔥 Ignite {#ignite} Ignite is an amazing CLI tool to help us get started buildin...


Near line 97: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ocal machine. This tutorial uses a macOS but it should work for Windows. For Windows...


Near line 110: Possible missing comma found.
Context: ...p ``` You should see an output of help commands meaning Ignite was installed successful...


Near line 125: Possible missing comma found.
Context: ...Cosmos-SDK version of Foundry or Hardhat but specifically designed to build blockcha...


Near line 128: The word “setup” is a noun. The verb is spelled with a white space.
Context: ... We first run the following command to setup our project for our new blockchain, Wor...


Near line 213: Possible missing comma found.
Context: ...ies for secure interaction with other modules which must alter user balances. We bui...


Near line 274: Consider using “who” when you are referring to a person instead of an object.
Context: ...submitter` is the address of the person that submitted the Wordle. The second type ...


Near line 539: Consider a shorter alternative to avoid wordiness.
Context: ...oins method to the BankKeeper interface in order to allow sending the reward to the right g...


Near line 665: Possible missing comma found.
Context: ... then get a response with a transaction hash as shown here: ```bash code: 0 codespa...


Near line 736: When ‘five-letter’ is used as a modifier, it is usually spelled with a hyphen.
Context: ... for the day. Now let’s try to guess a five letter word: <!-- markdownlint-disable MD013 ...


Near line 769: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ... correct word. 2. You can hash the word prior to submitting it to the chain, ensuring ...


Near line 775: Possible missing article found.
Context: ...mblebun/wordle-cli). 4. You can improve current date to stick to a specific timezone. 5...


Near line 777: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...wordle every day at a specific time. 6. You can create a vue.js front-end with Igni...

Additional comments not posted (9)
.vitepress/constants/constants.js (1)

1-12: The implementation of constants.js correctly defines and exports immutable version constants, aligning with the PR's objectives to centralize version management.

tutorials/quick-start.md (2)

5-7: The import of constants.js in the script setup is correctly implemented, ensuring that version constants can be dynamically used in the tutorial.


17-18: The dynamic insertion of rollkitLatestTag into the bash command is correctly implemented, promoting maintainability by using the centralized version constant.

tutorials/gm-world.md (3)

23-23: The import of constants.js in the script setup is correctly implemented, ensuring that version constants can be dynamically used in the tutorial.


38-38: The dynamic insertion of golangVersion into the bash command is correctly implemented, promoting maintainability by using the centralized version constant.


51-51: The dynamic insertion of mockDALatestTag into the bash command is correctly implemented, promoting maintainability by using the centralized version constant.

tutorials/wordle.md (3)

18-18: The import of constants.js in the script setup is correctly implemented, ensuring that version constants can be dynamically used in the tutorial.


92-92: The dynamic insertion of igniteVersionTag into the bash command is correctly implemented, promoting maintainability by using the centralized version constant.


178-178: The dynamic insertion of rollkitCosmosSDKVersion into the Go command is correctly implemented, promoting maintainability by using the centralized version constant.

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

Out of diff range and nitpick comments (4)
tutorials/gm-world.md (4)

Line range hint 59-59: Consider adding a comma after "simple" for better readability.

- To make it simple we will download a repository with a `gm-world` rollup that has an `init.sh` script that does all the setup for you.
+ To make it simple, we will download a repository with a `gm-world` rollup that has an `init.sh` script that does all the setup for you.

Line range hint 63-63: Consider rephrasing to avoid wordiness.

- In order to run it you need to have the jq command line tool installed.
+ To run it, you need to have the jq command line tool installed.

Line range hint 139-139: Add a comma after "this" for clarity.

- For convenience we export two of our keys like this:
+ For convenience, we export two of our keys like this:

Line range hint 146-146: Add an article before "transaction" and consider using a hyphen in "high-level".

- we just want to submit transaction from a high level perspective
+ we just want to submit a transaction from a high-level perspective
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between b295529 and 8cd5db8.
Files selected for processing (1)
  • tutorials/gm-world.md (2 hunks)
Additional Context Used
LanguageTool (6)
tutorials/gm-world.md (6)

Near line 59: Possible missing comma found.
Context: ...are your rollup blockchain. To make it simple we will download a repository with a `g...


Near line 63: Consider a shorter alternative to avoid wordiness.
Context: ... script in a new terminal: ::: warning In order to run it you need to have the jq command ...


Near line 64: Possible missing comma found.
Context: ... terminal: ::: warning In order to run it you need to have the jq command line to...


Near line 139: A comma is probably missing here.
Context: ...1lv8c1FWhLpqP"}' type: local ``` For convenience we export two of our keys like this: `...


Near line 146: Possible missing article found.
Context: ... flags, for now, we just want to submit transaction from a high level perspective): ```bas...


Near line 146: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... just want to submit transaction from a high level perspective): ```bash gmd tx bank send...

Additional comments not posted (4)
tutorials/gm-world.md (4)

22-22: Ensure the path to constants.js is correct and accessible from this Markdown file.

Verification successful

The verification script has confirmed that the file constants.js exists at the specified path .vitepress/constants/constants.js and is accessible from the location of the Markdown file gm-world.md. This confirms that the import statement in the Markdown file is correctly pointing to an existing and accessible file.

Based on this information, the path to constants.js as used in the import statement within the Markdown file is correct and does not present any issues regarding file accessibility.


The path to constants.js is verified as correct and accessible.

  • The file constants.js is located at .vitepress/constants/constants.js and is confirmed to be accessible.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the accessibility of `constants.js` from the Markdown file.

# Test: Check if the file exists at the specified path.
if [[ -f ./.vitepress/constants/constants.js ]]; then
  echo "File exists and is accessible."
else
  echo "File does not exist or is not accessible."
fi

Length of output: 117


37-37: LGTM! Using constants.golangVersion ensures that the Go version is centrally managed.


40-40: LGTM! Dynamically constructing the download URL with constants.golangVersion enhances maintainability.


50-50: LGTM! Using constants.mockDALatestTag for the Mock DA installation script ensures consistency and ease of updates.

@jcstein
Copy link
Member

jcstein commented May 7, 2024

lgtm! :shipit:
Screenshot 2024-05-07 at 10 55 33 AM

@jcstein jcstein merged commit 3079ae9 into main May 7, 2024
4 checks passed
@jcstein jcstein deleted the yarik/constants branch May 7, 2024 14:56
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