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

Add Deadlines to Output #114

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

Add Deadlines to Output #114

wants to merge 18 commits into from

Conversation

burgess01
Copy link
Contributor

Add Deadlines to Output

Description

This PR allows you to add a deadline in MM/DD/YY HH:MM:SS format to the yml file. If this is included, then the output will tell the user how long they have until their assignment is due or how late it is. If there is no deadline then nothing changes about the output.

Type of Change

  • Feature
  • Bug fix
  • Documentation

Contributors

@burgess01
Copy link
Contributor Author

burgess01 commented Mar 1, 2023

Here is an example of what the deadline section of the yml file would look like:

deadline: |
  03/01/23 12:00:00
---

Hours are in military time.
Here are two example outputs, one being for an on time assignment and one being late. I tested this with different dates using labs from 400.

✓  Delete the 'Add Your Name Here' prompt in the reflection file
✕  Write a minimum of 1000 meaningful words in the reflection
(..cut to save space..)
✕  The reflection.md in writing has at least 30 of the 'code_block' tag
✕  Have at least a specific minimum number of 10 commits in repository

-~- Your assignment is due in 0 days, 2 hours, 49 minutes, and 20 seconds. -~-

        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━┓
        ┃ Passed 12/18 (67%) of checks for 
computer-science-400-fall-2022-p4-data-processing-burgess01! ┃
        ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━┛
✓  Ensure that the processor.py file exists in project/pylang
✓  Complete all TODOs, remove the TODO markers, and rewrite comments for 
processor.py
(... cut to save space)
✕  The reflection.md in writing has at least 30 of the 'code_block' tag
✕  Have at least a specific minimum number of 10 commits in repository

-~- Your assignment is late. The deadline was 0 days, 21 hours, 9 minutes, and 39 seconds ago. -~-

        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━┓
        ┃ Passed 12/18 (67%) of checks for 
computer-science-400-fall-2022-p4-data-processing-burgess01! ┃
        ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━┛

Nothing from a cli standpoint would change from this PR.

@burgess01 burgess01 self-assigned this Mar 1, 2023
@burgess01 burgess01 requested a review from gkapfham March 1, 2023 02:33
@burgess01
Copy link
Contributor Author

burgess01 commented Mar 10, 2023

Deadlines are now included in both the json and markdown output:

{
"amount_correct": 12, 
"percentage_score": 67, 
"deadline": "Due in 0 days, 15 hours, 59 minutes, and 7 seconds.", 
(...)
}
# Gatorgrade Insights

**Project Name:** computer-science-400-fall-2022-p4-data-processing-burgess01
**Amount Correct:** 12/18 (67%)
**Deadline:** Due in 0 days, 16 hours, 2 minutes, and 58 seconds.

## Passing Checks
(...)

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.

I do have concerns with how much data coupling we have now (we're passing quite a few parameters around) but I'm not sure there's a quick-and-easy (or better) solution to that. Other than that this looks decent!

@burgess01
Copy link
Contributor Author

@Michionlion I was thinking the same thing. I wasn't sure of a better way to grab the data besides just passing it along like that. It seems like a waste to spend time trying to reparse again rather than just passing the variable through the different functions.

@Yanqiao4396 Yanqiao4396 self-requested a review April 17, 2023 00:43
@Yanqiao4396
Copy link
Contributor

Yanqiao4396 commented Apr 17, 2023

I believe the output is good in a short term. So I won't say no if people decide to merge it. However, I feel the same like you both that the data coupling is becoming a serious problem in this project. We are adding more and more parameters parsed into functions. For example, one of our most important functions run_checks is currently accepting 3 parameters checks, report, deadline and will probably accept 4 or more after we add more features while it was only designed to accept one checks at first.

Here I am discovering solutions. Can we do something like after parsing gatorgrade yaml file and build yaml file, we create an instance from a class where checks, report, deadline and all other new feature inputs will be attributes of that class. At the same time, we add execution functions related to certain attribute in the same class. So that we only need to parse the instance into a function and use a high-level function (that function is currently run_checks) to call certain methods if certain attributes are set to be True

@Yanqiao4396
Copy link
Contributor

Yanqiao4396 commented Jun 2, 2023

@Michionlion , @gkapfham , @burgess01 Hi guys, I am currently thinking about refactoring the codes related to this PR to avoid some future merge conflict. Would you mind if I close this PR and open a new one after the refactoring?

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.

None yet

3 participants