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

Progress Bar Implementation #149

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

Conversation

TitusSmith33
Copy link
Collaborator

Progress Bar Implementation

Description

This PR introduced a progress bar into the gatorgrade that demonstrates some dynamic progress bar to the user. The base implementation -what is included when you run the command gatorgrade in your terminal- is a dynamic progress bar that updates a progress bar based on if a check passes or fails, while the checks are being run. If a check passes, the progress updates the green section of the bar and any failed checks remain red on the progress bar. Below is an image of the expected output for the gatorgrade command, where as you can see some checks failed so that is represented in the progress bar:

image

This is what the progress bar output should look like if all the checks pass:

image

If you run gatorgrade --run_status_bar the functionality of the progress bar changes. Instead of updating the dynamic progress bar based on whether the checks pass or fail, this progress bar updates dynamically based on whether a gatorgrade check runs or fails to run. This implementation is useful for debugging and more advanced uses of gatorgrade. Similarly to the default progress bar, the bar updates green if a check runs and any failed checks keep a section of the bar red. Below is an image of the expected output for the gatorgrade --run_status_bar command, where as you can see some checks failed, however this progress bar is only concerned on if the checks run or not:

image

Lastly, there is an implementation using the command gatorgrade --no_status_bar which disables all progress bars and simply produces the output from gatorgrade with no progress bar present. Below is an image of the expected output for the gatorgrade --no_status_bar command, where there is no progress bar at all:

image

The implementation for this feature are in output.py in the run_checks functions, and the flags update for --run_status_bar and --no_status_bar are in main.py. I have run and tested this on a Windows 11 OS and would love to have another OS review this PR to ensure the feature is compatible across different OS. Thank you!!

Type of Change

  • Feature
  • Bug fix
  • Documentation

Contributors

@rebekahrudd rebekahrudd self-requested a review October 31, 2024 19:14
@rebekahrudd
Copy link
Collaborator

This worked on my Ubuntu computer running Linux.

Commands Ran:

gatorgrade
image

--run_status_bar
image

--no_status_bar
image

Copy link
Collaborator

@CalebKendra CalebKendra left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@AlishChhetri AlishChhetri left a comment

Choose a reason for hiding this comment

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

LGTM!

@TitusSmith33 TitusSmith33 requested a review from dyga01 November 8, 2024 15:18
Copy link
Collaborator

@dyga01 dyga01 left a comment

Choose a reason for hiding this comment

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

This feature appears to be working on Mac OS. Here is the output I got from running gatorgrade --config config/gatorgrade.yml:

Screenshot 2024-11-08 at 12 19 52 PM

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.

5 participants