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: fix invalid multiple links #23039

Closed
wants to merge 6 commits into from
Closed

docs: fix invalid multiple links #23039

wants to merge 6 commits into from

Conversation

osrm
Copy link
Contributor

@osrm osrm commented Dec 20, 2024

Description

I've checked every ‘md’ files in the repository and found some broken links that needed to be fixed.

1. "(../modules/authz/)" -> "(../authz/)"

**Note:** The auth module is different from the [authz module](../modules/authz/).

2. "(../../build/modules/staking/README.md)" -> "(/x/staking/README.md)"

For the purpose of explaining the query lifecycle, let's say the query, `MyQuery`, is requesting a list of delegations made by a certain delegator address in the application called `simapp`. As is to be expected, the [`staking`](../../build/modules/staking/README.md) module handles this query. But first, there are a few ways `MyQuery` can be created by users.

This query command was defined by the [`staking`](../../build/modules/staking/README.md) module developer and added to the list of subcommands by the application developer when creating the CLI.

3. "(../../build/modules/staking/README.md" -> "(/x/staking/README.md)"

| `create_validator.validator='cosmosval1...'` | x/staking-specific Event, see [x/staking SPEC](../../build/modules/staking/README.md). |

4. "(../modules/auth/)" -> "(../auth/)"

**Note:** The authz module is different from the [auth (authentication)](../modules/auth/) module, which is responsible for specifying the base transaction and account types.

Hope this helps.

Closes: #XXXX


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
    • Enhanced clarity and accuracy in the 08-events.md regarding event handling in the Cosmos SDK.
    • Updated links in the 02-query-lifecycle.md to point directly to the staking module documentation.
    • Corrected relative links in the x/auth/README.md and x/authz/README.md to accurately reflect the directory structure.

osrm added 6 commits December 20, 2024 19:35
"[auth (authentication)](../modules/auth/)" is invalid.

Changed to "[auth (authentication)](../auth/)"
"[x/staking SPEC](../../build/modules/staking/README.md" is not invalid.

Changed to "[x/staking SPEC](/x/staking/README.md)"
"[x/staking SPEC](../../build/modules/staking/README.md)" is invalid.

Changed to "[x/staking SPEC](/x/staking/README.md)"
"[authz module](../modules/authz/)" is invalid.

Changed to "[authz module](../authz/)"
Copy link
Contributor

coderabbitai bot commented Dec 20, 2024

📝 Walkthrough

Walkthrough

This pull request focuses on documentation updates across multiple files in the Cosmos SDK, primarily addressing broken or incorrect links and improving the clarity of documentation. The changes involve correcting relative paths in markdown files for modules like auth, authz, and documentation files related to events and query lifecycle. These updates aim to enhance the navigability and accuracy of the SDK's documentation without modifying any core functionality.

Changes

File Change Summary
docs/learn/advanced/08-events.md Enhanced documentation on events, clarifying their purpose, implementation, and usage in Cosmos SDK
docs/learn/beginner/02-query-lifecycle.md Updated links to staking module documentation
x/auth/README.md Corrected relative link to authz module
x/authz/README.md Updated reference path to authentication module

Possibly related issues

Possibly related PRs

Suggested labels

backport/v0.52.x

Suggested reviewers

  • julienrbrt
  • sontrinh16
  • akhilkumarpilli

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

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

🧹 Nitpick comments (1)
docs/learn/advanced/08-events.md (1)

Line range hint 1-100: Documentation improvements suggested

While reviewing the entire document, I noticed a few areas that could be improved:

  1. The Events table could benefit from consistent punctuation at the end of descriptions
  2. The WebSocket example could include a real-world response format to help developers understand what to expect

Would you like me to propose specific improvements for these sections?

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed9452 and a27b60a.

📒 Files selected for processing (4)
  • docs/learn/advanced/08-events.md (1 hunks)
  • docs/learn/beginner/02-query-lifecycle.md (2 hunks)
  • x/auth/README.md (1 hunks)
  • x/authz/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • x/authz/README.md
  • docs/learn/beginner/02-query-lifecycle.md
  • x/auth/README.md
🧰 Additional context used
📓 Path-based instructions (1)
docs/learn/advanced/08-events.md (1)

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

🔇 Additional comments (1)
docs/learn/advanced/08-events.md (1)

59-59: Verify the updated staking module documentation link

The link update to /x/staking/README.md aligns with the PR objectives. Let's verify that this path exists and is accessible.

✅ Verification successful

Link update to /x/staking/README.md is valid

The new path /x/staking/README.md exists in the repository, confirming that the documentation link update is correct and accessible.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the staking module documentation
# Expected: File should exist at the new path

# Check if the new path exists
fd -t f "README.md" x/staking/

Length of output: 50

@@ -56,7 +56,7 @@ The following examples show how to query Events using the Cosmos SDK.
| `tx.height=23` | Query all transactions at height 23 |
| `message.action='/cosmos.bank.v1beta1.Msg/Send'` | Query all transactions containing an x/bank `Send` [Service `Msg`](../../build/building-modules/03-msg-services.md). Note the `'`s around the value. |
| `message.module='bank'` | Query all transactions containing messages from the x/bank module. Note the `'`s around the value. |
| `create_validator.validator='cosmosval1...'` | x/staking-specific Event, see [x/staking SPEC](../../build/modules/staking/README.md). |
| `create_validator.validator='cosmosval1...'` | x/staking-specific Event, see [x/staking SPEC](/x/staking/README.md). |
Copy link
Member

Choose a reason for hiding this comment

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

this works when the docs site is generated.

Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

thank you for the pr but these links work correctly when the docs site is generated. If we accept this pr it will work on github but not on the docs site

@tac0turtle tac0turtle closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants