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

Test Case, Documentation, Refactoring for group_graph.py #261

Merged
merged 131 commits into from
Mar 14, 2019

Conversation

Lancasterwu
Copy link
Contributor

@Lancasterwu Lancasterwu commented Mar 13, 2019

Description of Pull Request

Fixes #241
Fixes #263
Fixed #247

This PR provides the group_graph.py test cases, a refactored group_graph.py, and documentation using group_graph.py in README.md.

This PR contains the following:

  • Delete if __name__ == "__main__": in group_graph.py
  • Provide 16 test functions in test_group_graph.py to have 100% coverage on group_graph.py.
  • Provide the Exception handling for def compatibility when the input measure is invalid.
  • Add Docstrings and comments to better explain group_graph.py
  • Documentation in README.md of how to use this feature and the theory behind it
  • Added 5 new parser arguments for user to provide parameters for def group_graph_partition by using command in terminal window: objective_weights, objective_measures, preferences, preferences_weight, preferences_weight_match.
  • Added 5 default values for these arguments
  • Notices that --objective-weights and --objective-measures requires the user to use the list as input which is hard to do in the terminal. However, we cannot use the CSV file due to Issue No Exception Handling for Reading a Single Line CSV #265 . One solution probably can be refactoring the code to make it read in objective-weights and objective-measures at the same time from the same CSV file.
  • Fixed a bug in read_student_file.py which it was not able to read in float and string at the same time.
  • Edited the pytest fixture which I used to generate CSV files so the test coverage for read_student_file.py can still be 100% after the change.
  • With the fix in read_student_file.py, temp.append(record[0].replace('"', "")) seems unnessesary.

Type of Change

Please describe the pull request as one of the following:

  • Bug fix
  • Breaking change
  • New feature
  • Documentation update
  • Other (Refactoring and Testing)

Tags

@Lancasterwu @thomad74 @wattob @baldeosinghm @yeej2

baldeosinghm and others added 30 commits March 9, 2019 22:55
merge master back to test group graph branch
Copy link
Contributor

@aubreypc aubreypc left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the changes! 👍

@Michionlion Michionlion merged commit 0324d57 into master Mar 14, 2019
@Michionlion Michionlion deleted the test/group-graph branch March 14, 2019 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants