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

Code update: refactor the way the report files are defined in the command line and passed into the configure_reports function #147

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

Conversation

rebekahrudd
Copy link
Collaborator

Code update: refactor the way the report files are defined in the command line and passed into the configure_reports function

Description

This latest change to gatorgrade is to refactor the code that configures the report. This update changes the command line interface and the commands that are passed in. There is no longer a `--report`` command rather there are three that address different aspects.
The purpose of this is to have better documentation for users to understand the acceptable options for each part of generating a report.

Linked Issues

https://github.com/GatorEducator/gatorgrade/issues/145

closes: #145

Type of Change

  • Feature
  • Bug fix
  • Documentation

Contributors

Testing this PR

Setup:

  1. Choose any unfinished repo with gatorgrade to test this gatorgrade update.
  2. In the pyproject.toml file of the repo you chose add the command pipx install git+https://github.com/rebekahrudd/gatorgrade in place of the command pipx install gatorgrade
  3. Save and push this update to Github
  4. Wait for Github actions to run

How to check if this PR worked:

  1. In GitHub actions check Gatorgrade to ensure you see "This is the new update of gatorgrade" printed next to FAILURES. This way you will know that rebekahrudd's branch ran and not the latest pipx version of gatorgrade
  2. When you are on the summary page of Github actions you should be able to see the GatorInsights Report. It should look like this:
    Screenshot from 2024-10-24 19-30-41

If you see the report and have confirmed that it was my version of Github that ran then this update is working and this PR can get approved!

…new configure_report input in test_output.py
@gkapfham
Copy link
Collaborator

Hello @rebekahrudd can you please give us several examples of the way in which you have changed the code and, in particular, can you clarify whether or not these refactorings are going to change the output and/or behavior of GatorGrade?

@gkapfham gkapfham self-assigned this Oct 25, 2024
@rebekahrudd
Copy link
Collaborator Author

The inputs to gatorgrade have changed though the output has not.

Here is a screenshot of the updated help menu:
image

Copy link
Collaborator

@hemanialaparthi hemanialaparthi left a comment

Choose a reason for hiding this comment

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

@rebekahrudd! I just tested this out locally and my --help function has the intented output:

(venv) hemanialaparthi@Hemanis-MacBook-Air executable-examination-example-solution % gatorgrade --help
                                                                                                                                                                              
 Usage: gatorgrade [OPTIONS] COMMAND [ARGS]...                                                                                                                                
                                                                                                                                                                              
 🐊 Run the GatorGrader checks in the specified gatorgrade.yml file.                                                                                                          
                                                                                                                                                                              
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --config                 -c      PATH        Name of the yml file. [default: gatorgrade.yml]                                                                               │
│ --report-location                [file|env]  [default: None]                                                                                                               │
│ --report-storing-type            [json|md]   [default: None]                                                                                                               │
│ --storing-location-name          [github]    [default: None]                                                                                                               │
│ --help                                       Show this message and exit.                                                                                                   │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

And, I can see my GitHub Actions reporting the insights:
image

NOTE: for future people testing this PR, the build.yml file is in the .github and also if you don't see your GitHub Actions, make sure you check if you have them enable for your repo.

@rebekahrudd rebekahrudd removed the request for review from Chezka109 October 28, 2024 17:15
gatorgrade/output/output.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@suppo01 suppo01 left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-10-31 150843

Looks good to me! I got the expected output using my fork of the solution repo.

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, descriptive commit messages

Copy link
Collaborator

@suppo01 suppo01 left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-11-08 103025

Looks good to me!

Copy link
Collaborator

@hemanialaparthi hemanialaparthi left a comment

Choose a reason for hiding this comment

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

This works!

image

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.

refactor code: update the way gatorgrade writes a run to a file and save the information
5 participants