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

Verify the Command-Line Arguments #2

Closed
gkapfham opened this issue Oct 2, 2017 · 15 comments
Closed

Verify the Command-Line Arguments #2

gkapfham opened this issue Oct 2, 2017 · 15 comments

Comments

@gkapfham
Copy link
Collaborator

gkapfham commented Oct 2, 2017

Currently, the program only provides command-line argument verification as is provided by default with the argparse library. As such, it might be useful to add more command-line verification. For instance, it might be useful to check that the size for the number of members in a group is within a suitable bounds. As an example, it would not make sense to request a group size that is greater than the number of students in the course. Moreover, it also would not be a good idea for the groups size to be close to the number of students in the course. Is there a way to set and check some reasonable bounds for these parameters?

@shafferz
Copy link
Contributor

shafferz commented Oct 3, 2017

Going to investigate the ways a Python program can read command-line arguments, and will investigate ways to set boundaries for them as well.

@castellanosr
Copy link
Contributor

Currently investigating the argparse library so that we will know what it is lacking and, therefore what we can add in order to improve the command-line verification. I am also looking at how to set bounds.

@mariakimheinert mariakimheinert self-assigned this Oct 4, 2017
@castellanosr
Copy link
Contributor

This is slightly ambiguous because there in not much instruction on what checks are necessary. We should check to make sure the group size does not exceed the number of the people in our class and does not approach it. However, what else do we need? This is something we should ask the customers about so that we ensure the product fulfils their desires.

@castellanosr
Copy link
Contributor

Upon speaking with the customer, we have learned that the two afore mentioned checks (group not exceeding class number or getting too close) are the only necessary checks unless other teams implement more features that need checking (referencing a google sheet, for example).

@IzaakMiller
Copy link

IzaakMiller commented Oct 4, 2017

Here is a good website to have a better understanding of how argparse works in python:
Python Documentation for Argparse

@castellanosr
Copy link
Contributor

Would we be able to simply use if statements for our checks or do we need to do a more complicated argparsing version (look at past two labs)?

@castellanosr
Copy link
Contributor

Last night @milleriAC and I were working on implementing command-line argument implementation. We believe that we have done so correctly, but near the end got a little confused on what exactly we were checking. We will need to speak with the group manager @yeeunmariakim to make sure we wrote the right check. Here is a picture of the brainstorming be did as a group beforehand.
brainstorming

@castellanosr
Copy link
Contributor

Last night @milleriAC and I implemented a few checks. We added an if statement to check and see if the group size was at least half the class size and to make sure the class size was at least one. As it is currently written the code will check and if the check fails a print statement will be displayed stating "invalid arguments" and the program will quit. @gkapfham as the customer, is this what you would like to see? Or would you prefer the error message to be more descriptive/for the program not to quit?

@mariakimheinert
Copy link
Contributor

@milleriAC @castellanosr how is making the revisions I suggested in the pull request going?

@castellanosr
Copy link
Contributor

@yeeunmariakim I just made the requested revisions. Will you look over them again and let me know how it looks?

@castellanosr
Copy link
Contributor

The moved logic I moved is now incomplete. We need to read the list because it does not exist yet in the parse_gatorgrader_arguments.py.

@shafferz
Copy link
Contributor

Hey @castellanosr and @milleriAC, I just read the code on the Pull Request that you've put up. I think I have an idea that will successfully implement our parse_gatorgrouper_arguments.py successfully, utilizing the read_student_file.py to use the code that you've already written, and to fix the gatorgrouper.py to also successfully make the revisions that @yeeunmariakim requested. I also discussed with Maria getting our implementations done as soon as possible, and she suggested that we try to complete the code by Friday evening. This will allow us time to implement changes that are necessary as a result of unforeseen dependencies on other issues.

I can open a branch and make changes to the code myself, if you'd both be okay with that. Alternatively, we can meet in person some time? I'm free on Thursdays after 8pm, Friday evenings after 5pm, and any time we may be able to work out on the weekend.

@castellanosr
Copy link
Contributor

@shafferz and I worked for over an hour trying to move the verification logic into the parse_gatorgrader_arguments.py but it did not work because of the order in which information is gained. The logic must stay where @milleriAC and I put it.

@mariakimheinert
Copy link
Contributor

@shafferz @castellanosr @milleriAC I moved the logic to the parse_gatorgrouper_arguments.py file (formerly named parse_gatorgrader_arguments.py without obstacle. That move has been merged into the issue 2 feature branch, which is currently under review in a pull request to be merged into master.

@mariakimheinert
Copy link
Contributor

closing this issue because the check for group size has been merged into master in pull request #35

Michionlion pushed a commit that referenced this issue Feb 18, 2019
Fixed line 66 from Kapfhammer review
Michionlion pushed a commit that referenced this issue Feb 20, 2019
leonardoz15 added a commit that referenced this issue Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants