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

Add badges in README to show status and statistics of the project. #75

Merged
merged 9 commits into from
Oct 25, 2024

Conversation

LinZhihao-723
Copy link
Member

@LinZhihao-723 LinZhihao-723 commented Oct 24, 2024

References

Description

This PR adds badges in README to show:

  • PyPI page
  • Github Actions
  • The number of downloads (total downloads and monthly downloads) using data from pepy.tech

Validation performed

Ensure README.md is successfully rendered the added badges.

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation
    • Added badges for total and monthly downloads to the README.
    • Updated compatibility information to require Python 3.7 or higher.

Copy link

coderabbitai bot commented Oct 24, 2024

Walkthrough

The changes in this pull request primarily involve updates to the README.md file of the clp-ffi-py project. Four badges have been added to indicate the package's PyPI platforms, build status, total downloads, and monthly downloads, with each badge linked to its respective tracking URL. Additionally, the compatibility section has been revised to specify that the project now requires Python 3.7 or higher, as it is no longer compatible with Python 3.6. The overall structure and content of the document remain intact.

Changes

File Change Summary
README.md Added four badges for PyPI platforms, build status, total downloads, and monthly downloads; updated compatibility section to require Python 3.7 or higher.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant README
    User->>README: View README.md
    README->>User: Display badges for downloads and build status
    README->>User: Show compatibility information (Python 3.7+)
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 960ed59 and 0fa167e.

📒 Files selected for processing (1)
  • README.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

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.

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

@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

🧹 Outside diff range and nitpick comments (1)
README.md (1)

339-341: Consider adding trailing newline and removing trailing space.

The reference links are properly defined, but there are a couple of minor formatting issues:

  • Line 340 has a trailing space
  • The file should end with a newline character

Apply this diff to fix the formatting:

 [clp-ffi-py-total-downloads]: https://static.pepy.tech/badge/clp-ffi-py
-[clp-ffi-py-monthly-downloads]: https://static.pepy.tech/badge/clp-ffi-py/month 
+[clp-ffi-py-monthly-downloads]: https://static.pepy.tech/badge/clp-ffi-py/month
 [pepy/clp-ffi-py]: https://pepy.tech/project/clp-ffi-py
+
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 6cceb7f and 960ed59.

📒 Files selected for processing (1)
  • README.md (2 hunks)
🔇 Additional comments (2)
README.md (2)

3-4: LGTM! The badges are properly placed and formatted.

The download badges are strategically positioned at the top of the README, making them immediately visible to users. The markdown syntax is correct, and the badges will render properly.


3-4: Verify badge URLs are accessible.

Let's ensure all URLs are accessible and returning the expected content.

Also applies to: 339-341

✅ Verification successful

Let me verify the redirect location for the pepy.tech project page to ensure it's properly redirecting.


Badge URLs are accessible and functional

All URLs are working as expected:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all badge-related URLs are accessible

# Test badge image URLs
echo "Checking badge image URLs..."
curl -s -I "https://static.pepy.tech/badge/clp-ffi-py" | head -n 1
curl -s -I "https://static.pepy.tech/badge/clp-ffi-py/month" | head -n 1

# Test pepy.tech project page
echo "Checking pepy.tech project page..."
curl -s -I "https://pepy.tech/project/clp-ffi-py" | head -n 1

Length of output: 385


Script:

#!/bin/bash
# Follow redirects to get final URL for pepy.tech project page
curl -s -L -I "https://pepy.tech/project/clp-ffi-py" | grep -i "location\|http/"

Length of output: 202

@LinZhihao-723 LinZhihao-723 changed the title Add badges in README to show the number of downloads. Add badges in README to show the PyPI package and the number of downloads. Oct 24, 2024
@LinZhihao-723 LinZhihao-723 changed the title Add badges in README to show the PyPI package and the number of downloads. Add badges in README to show status and statistics of the project. Oct 24, 2024
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@LinZhihao-723 LinZhihao-723 merged commit 6b3733e into y-scope:main Oct 25, 2024
61 checks passed
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