Closed brookehus closed 5 years ago
These are suggestions for #54 to be addressed before dealing with #55
I also added 2 tests to replace yours - let me know if you think the tests are missing something that yours had.
If you're OK to merge this into #54, then we can merge #54 into master, pull master into #55, and then check out where that leaves us with #55.
Ok, I've tried to also incorporate what you were getting at in #55. I moved your code to a test. Let me know what you think?
I made _get_redundant_distance_mapping
a hidden function that is called if get_redundant_distance_mapping
is set to True
(default) in the initialization. Can be turned off if not needed. We can also make the default false if that is better? What do you think?
I think the steps should be
test_redundant_distance_mapping_vals
LGTM. All tests pass.
The main thing I did here is make
order
an attribute ofProteinBackboneStatistics
(also renamed previous attribute_order
to avoid confusion). Theorder
is determined automatically based on what you calculate. I also removedorder
as an argument fromget_zscores
andget_bond_constants
, so you have to stick with the order you started with when you instantiated the class.The inspiration for doing this was that in your tests you rely on the ordering of keys in a dictionary, which is not a safe thing to do.
What do you think?