mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Setting up Matrix Sampling #222

Closed jolyonb closed 5 years ago

jolyonb commented 5 years ago

This PR brings the long-awaited matrix sampling structure together. It largely follows the structure laid out in #188; biggest difference is that I went for a dimension property for square matrices instead of shape. We can now sample matrices of all types!

Resolves #188 Resolves #148 Resolves #83 (about time!)

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-1.5%) to 98.257% when pulling e50781dd520d2ba402c424ad53dfa53808df7aae on matrixsampling into a2bb664c469601bd0aead66c56a8b86d09f8465b on master.

jolyonb commented 5 years ago

Decrease in coverage is due to the python3 orthogonal/unitary matrix samplers.

jolyonb commented 5 years ago

Welp, all the code is done. I need to write a bunch of tests now, but that's a job for tomorrow.

Sorting out the code to generate unit determinant matrices and zero determinant matrices was rather messy. I welcome any suggestions to clean things up.

jolyonb commented 5 years ago

Pushed tests to here so I can test python3 for orthogonal and unitary sampling. Almost ready for review!

jolyonb commented 5 years ago

Sorry that I'm using Travis for testing. I haven't set up a python3 test environment. Perhaps I should...

In other news, this is one of our biggest PRs!

jolyonb commented 5 years ago

Weird... Looks like codecov only got one of the two runs. Anyway, I have one more test to writenow...

ChristopherChudzicki commented 5 years ago

Yeah, looks like only got python 3 tests....weird

jolyonb commented 5 years ago

@ChristopherChudzicki This is ready for review. I also updated codecov options a little.

ChristopherChudzicki commented 5 years ago

Cool, I will review ~tomorrow morning~ right after lunch.

jolyonb commented 5 years ago

I'm just about to push a new commit once I get the tests passing in py2... Note that I've added a whole lot more tests for the SquareMatrices case (apparently I forgot to test all the different features).

jolyonb commented 5 years ago

Well, that took longer than I had hoped. Was good that I put in tests for all of the properties; I caught some bugs! Ready for re-review.

codecov-io commented 5 years ago

Codecov Report

Merging #222 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #222    +/-   ##
======================================
  Coverage     100%   100%            
======================================
  Files          27     28     +1     
  Lines        2211   2580   +369     
======================================
+ Hits         2211   2580   +369