ARC-Lab-UF / testbench-runner

Interactive testbench runner via Modelsim. Integrates with Canvas assignments.
2 stars 1 forks source link

Updated grader.py #6

Closed DieterSteinhauser closed 2 years ago

DieterSteinhauser commented 2 years ago

bugfix for issue with student.txt not being read. refactored the read operations into clearer methods, added example commands to the script notes. added comments and removed redundant spacing.

benjamin051000 commented 2 years ago

Hi @DieterSteinhauser! Thank you for contributing!

I haven't used this in a long time, since I primarily use it in the spring when I TA for Dr. Stitt. I also don't tag commits or do releases so I am honestly forgetting which features are on main and which are still on dev. Sheesh.

I'll accept your PR for now (on one condition, see below) as it doesn't appear to change any behavior and I trust it has been tested and works better than before. I don't really have the means or time to test it myself right now (CI would be nice but ain't nobody got time for that).

In regards to your changes, if I understand correctly, it appears that you refactored the --section and --student-list flags to functions. That's fine by me, it appears to be more readable. I'm definitely happy about making code more maintainable.

One thing I don't love is the inclusion of the example commands in the source. Please move those to the README file and I'll merge. The goal is that users of the project don't have to view the source code to use the program.

DieterSteinhauser commented 2 years ago

Hey @benjamin051000, the Examples have been taken out of grader.py.

To clarify, there was a small string split bug in the original parsing of the students.txt. I rectified it, then encapsulated both csv and txt reading into their own respective methods for clarity in their usage.

this was the only functional change I had made, with the rest being for readability.

regards,

Dieter

benjamin051000 commented 2 years ago

Done! Thanks for your help