cgevans / mixes

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Add EqualConcentration instead of confusing FixedVolume #9

Closed cgevans closed 2 years ago

cgevans commented 2 years ago

Every person who has tried to understand it seems to have found the equal_conc parameter to FixedVolume confusing. So this splits the action into two:

This is a breaking change that will break quite a bit of current code.

This is no longer a major breaking change, as there is code to allow the old behavaviour, mostly with a DeprecationWarning. However, note that now by default FixedVolume does not check that concentrations are equal, so this may break some code.

codecov-commenter commented 2 years ago

Codecov Report

Merging #9 (43323e7) into main (776b3c7) will decrease coverage by 34.80%. The diff coverage is 70.68%.

@@             Coverage Diff             @@
##             main       #9       +/-   ##
===========================================
- Coverage   99.60%   64.79%   -34.81%     
===========================================
  Files           3       12        +9     
  Lines         250     1642     +1392     
===========================================
+ Hits          249     1064      +815     
- Misses          1      578      +577     
Impacted Files Coverage Δ
src/alhambra_mixes/units.py 79.56% <ø> (ø)
src/alhambra_mixes/actions.py 86.85% <68.51%> (ø)
src/alhambra_mixes/locations.py 72.10% <100.00%> (ø)
src/alhambra_mixes/mixes.py 54.83% <100.00%> (ø)
tests/test_mixes.py
tests/test_printing.py
tests/test_quantitate.py
src/alhambra_mixes/printing.py 60.58% <0.00%> (ø)
src/alhambra_mixes/references.py 31.15% <0.00%> (ø)
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

cgevans commented 2 years ago

Note this also fixes some automatic code coverage calculation bugs, which in turn causes the coverage change to look horrible. The previous high coverage was wrong.