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

GatorGrade Motivator #158

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

Conversation

PhilipOlwoc
Copy link
Collaborator

GatorGrade Motivator

Description

In this feature a motivational message is meant to print when the user types --motivation. The point of the feature is meant to give students a little motivation when they are lacking in it. The feature is meant to print a message at 25%-50%, at 50%-75% and 75% onwards. Currently the quotes are hardcoded in a separate yaml file of which the professor can access and change if needed. This is an opt in feature so students would have to run the --motivation command to see the message. Below is the command needed to run the motivational quote.

image

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!

@gkapfham
Copy link
Collaborator

Hello @PhilipOlwoc it looks like this branch has conflicts that must be resolved. Can you please resolve them? Can you please share a status update as well?

@PCain02 PCain02 added the enhancement New feature or request label Nov 21, 2024
Copy link
Collaborator

@PCain02 PCain02 left a comment

Choose a reason for hiding this comment

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

Hey @PhilipOlwoc it still says there are merge conflicts to resolve. There is a handy button below this conversation that says "resolve conflicts" and after you have you have to mark them as resolved! Hope this helps!

@PhilipOlwoc
Copy link
Collaborator Author

hello @PCain02 and @gkapfham I believe I have fixed the merge conflicts.

@PhilipOlwoc PhilipOlwoc requested a review from PCain02 November 21, 2024 19:09
@CalebKendra CalebKendra self-requested a review November 21, 2024 20:57
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.

Here is the output I get when running this feature:

caleb@:security-survey-program-tracing-CalebKendra (main)$ gatorgrade --config config/gatorgrade.yml --motivation
Running set up commands...
🐊 Start to install dependencies ...
🐊 Note: Will not install dependencies if available
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: programtracer (0.1.0)
🐊 ... Done installing dependencies
Finished!

✓  Ensure that the reflection.md file exists in the writing/ directory
✓  Complete all TODOs, remove the TODO markers, and rewrite comments for the reflection
✓  Delete the 'Add Your Name Here' prompt in the reflection file
✓  Retype the every word in the Honor Code pledge in reflection.md
✓  Confirm that the markdown file has the correct number of headers
✓  Have at least a specific minimum of commits in repository
Running checks... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%

        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
        ┃ Passed 6/6 (100%) of checks for security-survey-program-tracing-CalebKendra! ┃
        ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

<rich.panel.Panel object at 0x7a8342e1c6b0>
caleb@:security-survey-program-tracing-CalebKendra (main)$ gatorgrade --config config/gatorgrade.yml --motivation
Running set up commands...
🐊 Start to install dependencies ...
🐊 Note: Will not install dependencies if available
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: programtracer (0.1.0)
🐊 ... Done installing dependencies
Finished!

✓  Ensure that the reflection.md file exists in the writing/ directory
✕  Complete all TODOs, remove the TODO markers, and rewrite comments for the reflection
✓  Delete the 'Add Your Name Here' prompt in the reflection file
✓  Retype the every word in the Honor Code pledge in reflection.md
✓  Confirm that the markdown file has the correct number of headers
✓  Have at least a specific minimum of commits in repository
Running checks... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━  83%

-~-  FAILURES  -~-

✕  Complete all TODOs, remove the TODO markers, and rewrite comments for the reflection
   → Found 1 fragment(s) in the reflection.md or the output while expecting exactly 0

        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
        ┃ Passed 5/6 (83%) of checks for security-survey-program-tracing-CalebKendra! ┃
        ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

<rich.panel.Panel object at 0x7d5217c32c60>

For some reason the object itself being printed instead of the rich console's formatting. I would look at the rich printing lines in order to fix this.

gatorgrade/output/output.py Outdated Show resolved Hide resolved
@PhilipOlwoc
Copy link
Collaborator Author

@CalebKendra I believe I fixed that issue, it should print normally now.

@rebekahrudd rebekahrudd self-requested a review November 25, 2024 04:01
Copy link
Collaborator

@rebekahrudd rebekahrudd left a comment

Choose a reason for hiding this comment

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

This worked on my Linux computer:
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.

I got the following error when running gatorgrade --config config/gatorgrade.yml with or without the motivator:

╭─────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────────────────────────────────────────╮
│ /home/caleb/.pyenv/versions/3.12.7/lib/python3.12/site-packages/gatorgrade/main.py:67 in gatorgrade                                                                                                             │
│                                                                                                                                                                                                                 │
│    64 │   │   # there are valid checks and thus the                                            ╭───────────────────────────────────────── locals ──────────────────────────────────────────╮                    │
│    65 │   │   # tool should run them with run_checks                                           │         checks = [                                                                        │                    │
│    66 │   │   if len(checks) > 0:                                                              │                  │   <gatorgrade.input.checks.GatorGraderCheck object at 0x73f430edeb40>, │                    │
│ ❱  67 │   │   │   checks_status = run_checks(checks, report, run_status_bar, no_status_bar, ru │                  │   <gatorgrade.input.checks.GatorGraderCheck object at 0x73f4311e9340>, │                    │
│    68 │   │   # no checks were created and this means                                          │                  │   <gatorgrade.input.checks.GatorGraderCheck object at 0x73f431021340>, │                    │
│    69 │   │   # that, most likely, the file was not                                            │                  │   <gatorgrade.input.checks.GatorGraderCheck object at 0x73f43087f560>, │                    │
│    70 │   │   # valid and thus the tool cannot run checks                                      │                  │   <gatorgrade.input.checks.GatorGraderCheck object at 0x73f43087f4d0>, │                    │
│                                                                                                │                  │   <gatorgrade.input.checks.GatorGraderCheck object at 0x73f43087f500>  │                    │
│                                                                                                │                  ]                                                                        │                    │
│                                                                                                │            ctx = <click.core.Context object at 0x73f431bdb8c0>                            │                    │
│                                                                                                │       filename = PosixPath('config/gatorgrade.yml')                                       │                    │
│                                                                                                │  no_status_bar = False                                                                    │                    │
│                                                                                                │         report = (None, None, None)                                                       │                    │
│                                                                                                │ run_motivation = True                                                                     │                    │
│                                                                                                │ run_status_bar = False                                                                    │                    │
│                                                                                                ╰───────────────────────────────────────────────────────────────────────────────────────────╯                    │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: run_checks() takes 2 positional arguments but 5 were given

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.

5 participants