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: ignore some commands #13

Merged
merged 1 commit into from
Mar 9, 2024
Merged

feat: ignore some commands #13

merged 1 commit into from
Mar 9, 2024

Conversation

ThaddeusJiang
Copy link
Owner

@ThaddeusJiang ThaddeusJiang commented Mar 9, 2024

Summary by CodeRabbit

  • Chores
    • Updated .gitignore to exclude .DS_Store files.
  • New Features
    • Added @bar_chart_length attribute for enhanced visualization.
    • Implemented ignoring specific commands in the CLI module.
    • Enhanced print_top_commands function to exclude ignored commands.
  • Refactor
    • Modified functions for improved data extraction and processing.
  • Documentation
    • Updated README.md to reflect new features and attributes of the CHR tool.

Copy link

coderabbitai bot commented Mar 9, 2024

Walkthrough

The recent update focuses on enhancing the CHR tool, previously known as "chr", by refining its functionality and user interface. Changes include improved command and directory tracking, a more detailed visualization of user activity with emojis, and an update to dependencies. This version also emphasizes the exclusion of certain commands from reports, aiming for more relevant analytics.

Changes

File(s) Change Summary
.gitignore Added .DS_Store to ignored files.
lib/chr.ex Enhanced command and directory tracking, activity visualization, and added @bar_chart_length.
lib/chr/cli.ex, lib/chr/print.ex Updated to filter out ignored commands and included emojis in titles and footers.

🐰✨
Changes abound, the tool evolves,
With 📂 and 💦, our problem solves.
A 📅 full of code, a 🕑 to cherish,
In CHR's light, inefficiency perishes.
Hop along, dear user, with glee,
For your command history, as clear as can be.
🌟🐇

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-tests 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 tests 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 tests.
    • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between ea0bad5 and f41fbbb.
Files ignored due to path filters (1)
  • mix.lock is excluded by: !**/*.lock
Files selected for processing (6)
  • .gitignore (1 hunks)
  • README.md (2 hunks)
  • lib/chr.ex (8 hunks)
  • lib/chr/cli.ex (2 hunks)
  • lib/chr/print.ex (5 hunks)
  • mix.exs (2 hunks)
Files skipped from review due to trivial changes (1)
  • .gitignore
Additional comments: 14
lib/chr/cli.ex (2)
  • 6-6: The addition of the @ignore_commands attribute is correctly implemented and follows Elixir's conventions for module attributes.
  • 17-17: The integration of the @ignore_commands attribute within the main function is correctly implemented, ensuring that specified commands are ignored in the top commands report.
mix.exs (3)
  • 7-7: The project version update from "0.2.0" to "0.2.1" is correctly implemented, indicating backward-compatible enhancements or bug fixes.
  • 15-15: The project name change from "chr" to "CHR" is correctly implemented, reflecting the branding changes mentioned in the PR objectives.
  • 35-36: The updates to dependencies, including the version update for {:owl} and the addition of {:ucwidth}, are correctly implemented, ensuring compatibility with the latest versions.
lib/chr/print.ex (2)
  • 118-118: The integration of emojis into the titles of various functions is correctly implemented, enhancing the visual appeal of the output.
  • 87-105: The changes to the print_top_commands function, including the addition of the ignore_commands parameter and the inclusion of a footer displaying ignored commands, are correctly implemented, enhancing functionality and transparency.
README.md (2)
  • 3-3: The rebranding of the tool from "chr" to "CHR" is correctly reflected in the documentation, aligning with the branding changes mentioned in the PR objectives.
  • 54-117: The integration of emojis into the documentation to highlight features is correctly implemented, enhancing the visual appeal and readability.
lib/chr.ex (5)
  • 6-6: The addition of the @bar_chart_length attribute is correctly implemented, standardizing the length of bar charts across the application.
  • 39-43: The modifications to the pick_up_command function, including splitting by ";" and extracting the first element, are correctly implemented, enhancing its functionality.
  • 88-91: The changes to the top_commands function, including filtering out ignored commands, are correctly implemented, aligning with the PR objectives.
  • 213-213: The enhancements to the weekly_activity function, including the use of @bar_chart_length for calculations, standardize the length of bar charts, improving consistency.
  • 268-268: The improvements to the daily_activity function, including the use of @bar_chart_length for calculations, standardize the length of bar charts, enhancing consistency.

add some tests, fix weekly and daiy bugs
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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between ea0bad5 and 04f82d8.
Files selected for processing (4)
  • .gitignore (1 hunks)
  • lib/chr.ex (5 hunks)
  • lib/chr/cli.ex (2 hunks)
  • lib/chr/print.ex (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • .gitignore
  • lib/chr.ex
  • lib/chr/cli.ex
  • lib/chr/print.ex

@ThaddeusJiang ThaddeusJiang merged commit 9ae020b into main Mar 9, 2024
@ThaddeusJiang ThaddeusJiang deleted the feat/ignore_commands branch March 9, 2024 05:32
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.

None yet

1 participant