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: filter specific checks #150

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

Conversation

Chezka109
Copy link
Collaborator

Filtering Specific Checks

Description

This feature adds the ability to filter GatorGrade results to show only the failing checks when running the command. By including a flag such as --show-failures, users will be able to see just the errors, which will make it easier to focus on the areas that need improvement without sifting through the passing checks. In addition to this, users can use the flag --check-include "{argument}" to show only a specific check and --check-exclude "{argument}" to remove specific checks when gatorgrade runs.

Screenshots:

  • gatorgrade --show-failures
Screenshot 2024-10-31 at 2 38 00 PM
  • gatorgrade --check-include "Ensure that Question 1"
Screenshot 2024-10-31 at 2 39 34 PM
  • gatorgrade --check-exclude "Ensure that Question 1"
Screenshot 2024-10-31 at 2 40 24 PM

NOTE: Arguments for the --check-include and --check-exclude uses fuzzy clustering. This means that:
If a check appears as: Complete all TODOs, remove the TODO markers, and rewrite comments for question_one.py
A user may write the command as any of the following:

  • gatorgrade --check-include "Complete all TODOs"
  • gatorgrade --check-include "Complete all todos"
  • gatorgrade --check-include "CompleTe all Todos"
  • gatorgrade --check-include "Co"
  • gatorgrade --check-include "TODO"

Linked Issues

closes: #139

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!

@Chezka109 Chezka109 added the enhancement New feature or request label Oct 31, 2024
@Chezka109
Copy link
Collaborator Author

@gkapfham i've been trying to fix the build for a couple weeks now and still can't figure it out. according to the workflow, there's something wrong with the parse_config.

here is the code block for the failure:

=================================== FAILURES ===================================
___________ test_parse_config_gg_check_in_file_context_contains_file ___________

    def test_parse_config_gg_check_in_file_context_contains_file():
        """Test to make sure that the file context is included in the GatorGrader arguments."""
        # Given a configuration file with a GatorGrader check within a file context
        config = Path("tests/input/yml_test_files/gatorgrade_one_gg_check_in_file.yml")
        # When parse_config is run
        output = parse_config(config)
        # Then the file path should be in the GatorGrader arguments
>       assert "file.py" in output[0].gg_args
E       AttributeError: 'list' object has no attribute 'gg_args'

tests/input/test_input_gg_checks.py:17: AttributeError
=========================== short test summary info ============================
FAILED tests/input/test_input_gg_checks.py::test_parse_config_gg_check_in_file_context_contains_file - AttributeError: 'list' object has no attribute 'gg_args'
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============================== 1 failed in 0.39s ===============================
Error: Process completed with exit code 1.

@boulais01
Copy link
Collaborator

@Chezka109 Since this is failing/incomplete, consider marking this as a draft.

@Chezka109 Chezka109 marked this pull request as draft November 8, 2024 15:45
@Chezka109 Chezka109 marked this pull request as ready for review November 15, 2024 15:02
@gkapfham
Copy link
Collaborator

Hello @Chezka109 can you please ensure that you first have reviews from two students who did not work on this feature and from at least one student technical leader?

@CalebKendra
Copy link
Collaborator

@Chezka109 do you now need reviews from TL's/other students? please add as reviewer if needed

@rebekahrudd
Copy link
Collaborator

I tried to test this PR but I keep getting the error that there is no module called thefuzz. I have installed thefuzz with the command pip install thefuzz.

Here is a screenshot that shows that thefuzz is installed and that when running it doesn't work:
image

It's also worth considering that the package thefuzz has a failing build right now. I don't know if affecting why it isn't working for me. Here is the link to thefuzz GitHub page: https://github.com/seatgeek/thefuzz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: filtered check flags
6 participants