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

feat(stats): dependency table #1231

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bragov4ik
Copy link
Contributor

@bragov4ik bragov4ik commented Feb 5, 2025

Summary by CodeRabbit

  • Chores

    • Streamlined the automated testing process by reducing unnecessary logging during database tests to improve performance.
  • Documentation

    • Expanded service documentation with new sections on dependency version requirements, enhanced build instructions using Docker, detailed configuration options, and clearer setup steps for development.

Copy link
Contributor

coderabbitai bot commented Feb 5, 2025

Walkthrough

This pull request updates the workflow configuration and service documentation. Within the workflow file (.github/workflows/stats.yml), the command executed during the database tests step has been modified by removing logging parameters. A comment now explains the removal, while the conditional execution logic remains unchanged. In addition, the service documentation (stats/README.md) has been expanded. The README now includes new sections that detail dependency version requirements, enhanced build instructions using Docker and Docker Compose, as well as comprehensive configuration and environment variable information. Instructions for manual development runs and additional details on various settings such as server, tracing, and metrics have also been incorporated.

Poem

I'm a rabbit, hopping with glee through code and light,
Trimming logs with a skip, making tests run just right.
New docs shine bright with details in every line,
Dependency hints and config tips perfectly align.
With a twitch of my whiskers and a joyful heart so true,
I celebrate these changes—happy hops to you! 🐇✨

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

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.

CodeRabbit Configuration 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

@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 (3)
stats/README.md (3)

14-15: Ensure Consistent Unordered List Styling.
Static analysis indicates that unordered list items should use plus signs instead of dashes (MD004). Consider updating these list markers from “-” to “+” for a consistent markdown style throughout the document.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

14-14: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)


15-15: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)


17-27: Correct Header Typo in Dependency Section.
The header currently reads “Dependecy version requirements.” Please correct the spelling to “Dependency version requirements.”

Proposed diff:

-### Dependecy version requirements
+### Dependency version requirements

227-227: Fix Typo in Blockscout Instance Instructions.
There’s a typographical error: “varialbe” should be corrected to “variable.”

Proposed diff:

-+ Start blockscout instance with varialbe `DATABASE_URL=postgres://postgres:[email protected]:5432/blockscout`
+Start blockscout instance with variable `DATABASE_URL=postgres://postgres:[email protected]:5432/blockscout`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1bdb48 and 57df88f.

📒 Files selected for processing (2)
  • .github/workflows/stats.yml (1 hunks)
  • stats/README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
stats/README.md

14-14: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)


15-15: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Unit, doc and integration tests
🔇 Additional comments (5)
.github/workflows/stats.yml (1)

69-72: Clarify Logging Removal in DB Tests Step.
The inline comments now provide a clear rationale for removing extensive logging during the DB tests (improving performance and log manageability). Ensure that, if needed, an alternative logging approach is considered for troubleshooting in non-performance-critical environments.

stats/README.md (4)

7-8: Enhance Service Components Description.
The added lines clearly distinguish between the stats calculation library and the transport layer (stats-server). This additional detail improves the overall architectural clarity of the service.


32-34: Update Docker Build Instructions.
The newly added instructions for building via a Dockerfile and pulling images from the registry are clear and add valuable context. This helps streamline the build process for users.


219-220: Include Prerequisite Installation Details.
The checklist for installing Docker, Rust, and Just in the "For development" section is a useful addition to help developers set up their environment correctly.


242-245: Clarify Docker Compose Environment Settings.
The new instructions detailing the setting of ETHEREUM_JSONRPC_HTTP_URL, FIRST_BLOCK, and ETHEREUM_JSONRPC_VARIANT followed by the Docker Compose command provide clear guidance for configuring the development environment.

@bragov4ik bragov4ik requested a review from sevenzing February 5, 2025 13:52
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 (2)
stats/README.md (2)

14-15: Consistent Markdown List Style Suggested
The newly added list items here use dashes; however, markdownlint (MD004) recommends using plus signs for unordered lists. Consider updating these lines to use plus signs for consistency with our style guidelines.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

14-14: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)


15-15: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)


17-27: Typo and Clarity in Dependency Version Requirements Section
There is a minor typo in the section header on line 17—"Dependecy" should be corrected to "Dependency." Other than that, the new table and accompanying description provide a valuable and clear summary of version requirements.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 57df88f and 846a17b.

📒 Files selected for processing (1)
  • stats/README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
stats/README.md

14-14: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)


15-15: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Unit, doc and integration tests
🔇 Additional comments (4)
stats/README.md (4)

7-8: Addition of New Service Components
The new bullet items clearly delineate the separation between the stats calculation library and the transport layer. Their use of the plus sign for list markers aligns with best practices.


32-35: Enhanced Build Instructions with Docker Information
The added build instructions clearly show users how to build the service using Docker, both via the provided Dockerfile and the registry images. Please ensure that the linked resources remain up-to-date as the repository evolves.


219-221: Clear Prerequisites for Development Environment
The additional instructions in the "For development" section—especially the installation links for Docker, Rust, and Just—are clear and helpful for new developers setting up the environment.


242-245: Improved Docker Compose Guidance for Development
The new steps for setting environment variables and running the docker compose file enhance the development documentation. This guidance should help reduce initial setup friction.

stats/README.md Outdated
@@ -11,6 +11,19 @@ The service consists of 2 parts, a stats calculation library and a transport lay

- Postgresql database for this service
- Access to Blockscout database
- (Preferable) Access to Blockscout API
Copy link
Member

Choose a reason for hiding this comment

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

What does preferable mean and what happens if an access would not be available?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added some lead to more info, can you recheck and see if it's clear now?

Copy link
Member

@rimrakhimov rimrakhimov Feb 6, 2025

Choose a reason for hiding this comment

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

It's better now, yes. Though I still believe 'preferable' is not the best name for such (sometimes required sometimes optional) requirements, but I cannot come up with anything better as well

Copy link
Contributor Author

@bragov4ik bragov4ik Feb 6, 2025

Choose a reason for hiding this comment

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

Maybe someone on the tech call will come up with a better approach 😇

@bragov4ik bragov4ik requested a review from rimrakhimov February 6, 2025 08:33
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 (5)
stats/README.md (5)

7-8: Consistent List Markers for Service Components
The new bullet points use a plus sign, which doesn't match the dashed markers used in the Requirements section. Consider standardizing the list marker style across the document for clarity and consistency.


17-17: Typo in Section Heading
The heading "### Dependecy version requirements" contains a typo. Please change "Dependecy" to "Dependency".


19-21: Rephrase for Improved Clarity
The phrase "if there is a need in using older versions" could be reworded for better readability. Consider changing it to "if you need to use older versions".


38-38: Concise Docker Compose Instructions
The Docker Compose instructions are succinct and direct. You might consider adding a brief note on any required environment variables if applicable.


226-226: Typographical Error in Development Instructions
There is a typo in the phrase "Start blockscout instance with varialbe…". It should read "variable".

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 846a17b and 19b565a.

📒 Files selected for processing (1)
  • stats/README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
stats/README.md

14-14: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)


15-15: Unordered list style
Expected: plus; Actual: dash

(MD004, ul-style)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Unit, doc and integration tests
🔇 Additional comments (4)
stats/README.md (4)

23-26: New Dependency Version Table Added
The added table clearly outlines the recommended versions for the Blockscout and User Ops Indexer components. The rows are sorted in descending order as previously suggested.


32-34: Clear Docker Build Instructions
The instructions detailing how to build the service using the Dockerfile and the registry link are clear and helpful.


288-288: Enhanced Development Setup Instructions
The new development setup instructions—complete with installation links for Docker, Rust, and Just—are a valuable addition for onboarding developers.


311-317: Comprehensive Docker Compose Guidance
The Docker Compose section provides clear, actionable steps that are easy to follow. Great job on enhancing the documentation!

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.

3 participants