GatorIncubator / gatorgrouper

:busts_in_silhouette: Automated Group Formation Tool Enabling Effective Team Work
GNU General Public License v3.0
20 stars 20 forks source link

Improve generality of read_students_file #234

Closed aubreypc closed 5 years ago

aubreypc commented 5 years ago

Description of the Issue

Reading student data from a CSV file occurs in both the Django app and the command-line app, but the existing read_students_file function only applies to the command-line context.

Add Detailed Comment with More Information

  1. Currently the function takes a file path string as an argument, but in our Django app we have a case in which we need to pass in a file-like object instead of a path. To avoid duplicating code, this function should be refactored to accept both types, skipping the process of opening the file if the argument is not a string.
  2. Rather than parsing just true and false values in the CSV, integers and floats should also be parsed.
Lancasterwu commented 5 years ago

Hi @finneyj2, have you make any progress on this? If not, I will do it since in order to implement group_graph.py to gatorgrouper_cli.py, I need to change the way read_students_file.py generates the responses anyway.