-
Notifications
You must be signed in to change notification settings - Fork 12
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: hints for failing checks #156
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For others running this I manually added a hint in my gatorgrade.yml
file. Also from what I found, hints can only be added to the "options" lists and not just any command in the gatorgrade.yml
. I tried adding a hint to another command that failed and did not see the hint
output.
Can commands without the "options" list have hints? It might be worth adding it as it's own category rather than as part of the "options" list in the gatorgrade.yml
file. This way professors can add a hint
to any element of the gatorgrade.yml
file.
Also, when both the run this command
and the hint
prints there is a space between the command that ran and the hint
. This would be worth addressing. It makes it confusing to read. I hard coded a new line character in the run this command
. A possible fix might be adding the hint
before the run this command
or figuring out a way to only add the newline character if there is no hint
after it.
The changes I made to the gatorgrade.yml
file:
Here is the output I see in my terminal when running this:
To fix:
- move
hint
out of the options list in thegatorgrade.yml
(but this also could be me just not quite understanding the hint feature) - remove the newline from
run this command
whenhint
andrun this command
are both print - consider: changing the color scheme so that
hint
is more easily differentiable fromrun this command
@rebekahrudd Thanks for thoroughly reviewing this feature! I think our class should talk about everything you mentioned during my demo. |
Hi @dyga01 there are changes requested for this PR, can you please resolve them and then report back as to your status? |
Hi @dyga01, do you have any update for this pr? |
Hi @CalebKendra, this PR has been updated to work with shell checks and also now works with Rebekah's "run this command" feature. I think this PR is ready to be reviewed. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked on Linux!
Here is the output of adding a hint to a ShellCheck command that calls gatorgrader:
Here is the output of adding a hint to a GatorGradeCheck:
To test this PR install gatorgrade
using the following command: pipx install --force git+https://github.com/dyga01/gatorgrade.git@hint_feature
@@ -17,29 +17,6 @@ def test_parse_config_gg_check_in_file_context_contains_file(): | |||
assert "file.py" in output[0].gg_args | |||
|
|||
|
|||
def test_parse_config_check_gg_matchfilefragment(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this test deleted? Is there a good replacement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the Windows bug as an example for fun. The "MatchFileFragment" is something @suppo01 and @rebekahrudd are working on now but I thought it would be interesting if I used the hint feature with it. Good job overall, I think this format will be useful for future features. One question, I saw a test case was deleted and nothing replaced it why was that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I meant to wait to approve until I got a response about the test case.
Hint Feature
Description
This feature allows instructors to add hints that will be displayed anytime a check fails. The hints can be added under options in the gatorgrade.yml file. This will be very beneficial because it provides instructors with an opportunity to provide additional information for more difficult checks.
Linked Issues
closes: #155
Type of Change
Contributors
Images
This is an example of the feature on a hint for a very simple check.
gatorgrade --config config/gatorgrade.yml
on normal repositorygatorgrade --config config/gatorgrade.yml
on repository that also includes execexam