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

Execute shell checks and improve output #91

Merged
merged 8 commits into from
Aug 8, 2022

Conversation

mariakimheinert
Copy link
Member

Execute shell checks and improve output

Description

Previously, GatorGrade could parse shell checks from a gatorgrade.yml, but it would not execute these shell checks. The changes in this PR support the execution of these shell checks. Additionally, this PR adds some improvements to the output of GatorGrade so that it more closely resembles the output of GatorGradle.

The current output of GatorGrade in main, when run on the GatorGrade Hello World example:

Running set up commands...
Installing dependencies from lock file

No dependencies to install or update
Setup complete!
Finished!

✔  Complete all TODOs
✔  Call the say_hello function
✔  Call the say_hello_color function
✔  Have a total of 5 commits, 2 of which were created by you
✘  Complete all TODOs
    →  Found 3 fragment(s) in the reflection.md or the output
✘  Write at least 25 words in writing/reflection.md
    →  Found 3 word(s) in total of file reflection.md
Passing 4/6, Grade is 66.66666666666666%.

The new output of GatorGrade with the changes in this branch:

Running set up commands...
Installing dependencies from lock file

No dependencies to install or update
Setup complete!
Finished!

✔  Complete all TODOs
✔  Call the say_hello function
✔  Call the say_hello_color function
✘  Complete all TODOs
✘  Write at least 25 words in writing/reflection.md
✔  Pass pylint
✔  Have a total of 5 commits, 2 of which were created by you

-~-  FAILURES  -~-

✘  Complete all TODOs
   → Found 3 fragment(s) in the reflection.md or the output
✘  Write at least 25 words in writing/reflection.md
   → Found 3 word(s) in total of file reflection.md

        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
        ┃ Passed 5/7 (71%) of checks for gatorgrade-hello-world! ┃
        ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

The key differences in the output are:

  • The inclusion of shell checks
  • The checks are executed and printed in the order they are configured in gatorgrade.yml
  • Failed checks are highlighted again in a separate list, just as with GatorGradle
  • The final percentage of passed checks is highlighted by a border, just as with GatorGradle

To support these changes, some of the input and much of the output code has been refactored. Because of this, I am adding as reviewers the members of the input and output teams in case anyone is available and would like to review this refactoring 🙂

Linked Issues

Closes: #13

Type of Change

  • Feature
  • Bug fix
  • Documentation

Contributors

Reminder

  • All GitHub Actions should be in a passing state before any pull request is merged.
  • All PRs must be reviewed by at least one team member and one member of the Integration team!
  • Any issues this PR closes are tagged in the description!

More specifically, fix spacing issues in the output, run checks in order (regardless of type), and print summary statement in the same style as GatorGradle. These changes will make GatorGrade feel very similar to current GatorGradle users.
@gvanzin-allegheny gvanzin-allegheny self-requested a review July 25, 2022 21:51
Copy link
Contributor

@gvanzin-allegheny gvanzin-allegheny left a comment

Choose a reason for hiding this comment

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

Everything looks good.

Copy link
Member

@Michionlion Michionlion left a comment

Choose a reason for hiding this comment

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

This looks great! Looking forward to seeing it in action.

gatorgrade/output/check_result.py Outdated Show resolved Hide resolved
gatorgrade/output/output.py Outdated Show resolved Hide resolved
gatorgrade/output/output.py Show resolved Hide resolved
gatorgrade/output/output.py Show resolved Hide resolved
gatorgrade/output/output.py Outdated Show resolved Hide resolved
gatorgrade/output/output.py Show resolved Hide resolved
@mariakimheinert mariakimheinert merged commit 3d02726 into main Aug 8, 2022
@mariakimheinert mariakimheinert deleted the feature/improve-output branch August 8, 2022 01:05
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.

gatorgrade.yml shell command checks
4 participants