Closed kevindlewis23 closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 30.65%. Comparing base (
b6ae69f
) to head (d867986
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Was this unit tested against the multi-ruby datasets? I don't see that specific test. Just want to make sure this does not break a multi-grain grains table but changing the shape incorrectly.
Was this unit tested against the multi-ruby datasets? I don't see that specific test. Just want to make sure this does not break a multi-grain grains table but changing the shape incorrectly.
I don't think there are any testcases for the multi-ruby sets. The compare_grain_fits
method in tests/fit_grains_check.py
even calls np.atleast_2d
on the inputs anyway. With the multi-ruby datasets, this will already be 2d and this statement won't have any effect, but I understand not merging until we have those testcases.
We probably want to have unit tests for something other than the single ge detector anyway.
Ah I see. Since it will not have any effect, and it allows a single grain to be fit correctly, then I don't see why we cannot push this through. We should create an artificial mruby test case with a single grain just be eliminating the other two grains in the grains.out estimate.
The only fit grains test we have is for the single ruby GE example, which actually only has one grain. However, it may be called in a different way such that a 2D grains_table is passed and avoids the error you were seeing @gustafsonsven. This change could potentially fix your issue while not affecting other cases. I'll approve and merge it.
Confirm this correctly understands what
grain_table
is. This still passes the testcases, and if test_fitgrains is changed to remove the ndmin=2 (and making other necessary changes), it also passes, implying that this change does what it's supposed to do.closes #677