Skip to content

Fix mass conservation for H+ and OH- in Solution.__add__ following #270#274

Merged
rkingsbury merged 6 commits intomainfrom
pr/258
Aug 8, 2025
Merged

Fix mass conservation for H+ and OH- in Solution.__add__ following #270#274
rkingsbury merged 6 commits intomainfrom
pr/258

Conversation

@rkingsbury
Copy link
Copy Markdown
Member

@rkingsbury rkingsbury commented Aug 8, 2025

#270 introduced a change to Solution.__add__ that inadvertently broke mass conservation of H+ and OH- species when adding solutions. This PR fixes that issue. In brief, __add__ now relies on conservation of mass of H+ and OH- in the components attribute to determine the new pH of the mixed solution.

@rkingsbury rkingsbury changed the title Pr/258 Fix mass conservation for H+ and OH- following #270 Aug 8, 2025
@rkingsbury rkingsbury changed the title Fix mass conservation for H+ and OH- following #270 Fix mass conservation for H+ and OH- in Solution.__add__ following #270 Aug 8, 2025
@rkingsbury rkingsbury added the fix Bug Fixes label Aug 8, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.63%. Comparing base (e6dde9d) to head (bf9cee1).
⚠️ Report is 99 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #274      +/-   ##
==========================================
+ Coverage   81.90%   83.63%   +1.72%     
==========================================
  Files           9        9              
  Lines        1503     1460      -43     
  Branches      261      251      -10     
==========================================
- Hits         1231     1221      -10     
+ Misses        226      210      -16     
+ Partials       46       29      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rkingsbury rkingsbury merged commit d231e05 into main Aug 8, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant