Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution: add automatic charge balancing and other misc improvements #151

Merged
merged 15 commits into from
Jul 27, 2024

Conversation

rkingsbury
Copy link
Member

@rkingsbury rkingsbury commented Jul 26, 2024

[1.1.0] - 2024-07-27

Fixed

  • equilibrate: Fixed a bug that could cause an AttributeError when pH was used for charge
    balancing.
  • Database: size.radius_ionic was missing units for Ni[+2] and Cr[+3]. Correct units have been added.

Added

  • Solution: New automatic charge balancing method will automatically identify the majority (highest concentration)
    cation or anion as appropriate (depending on the charge balance) for charge balancing. To use this mode, set
    balance_charge='auto' when instantiating a Solution.

Changed

  • Solution.add_amount: This method will now add solutes that are absent from the Solution. Previously, calling, e.g.,
    add_amount('Na+', '1 mol') on a Solution that did not contain any sodium would result in an error. A warning
    is logged if the method has to add a new solute.
  • pre-commit autoupdate
  • Misc. linting and code quality improvements.
  • Unit tests: update tmpdir to tmp_path text fixture.
  • CI: Small updates to pre-commit and GitHub actions per scientific python repo review.

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.24%. Comparing base (f7d39e9) to head (2afe6ef).
Report is 1 commits behind head on main.

Files Patch % Lines
src/pyEQL/solution.py 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
+ Coverage   81.84%   82.24%   +0.39%     
==========================================
  Files           9        9              
  Lines        1482     1470      -12     
  Branches      321      321              
==========================================
- Hits         1213     1209       -4     
+ Misses        226      220       -6     
+ Partials       43       41       -2     

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

@rkingsbury rkingsbury changed the title testing: tmpdir -> tmp_path Solution: add automatic charge balancing and other misc improvements Jul 26, 2024
@rkingsbury rkingsbury added the release:minor will issue a minor release label Jul 26, 2024
@rkingsbury rkingsbury merged commit 1525552 into main Jul 27, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant