Feature: Saturation Index Retrieval and Plotting#395
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #395 +/- ##
==========================================
+ Coverage 86.23% 86.42% +0.19%
==========================================
Files 14 14
Lines 1853 1879 +26
Branches 323 326 +3
==========================================
+ Hits 1598 1624 +26
Misses 209 209
Partials 46 46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi Shaun, I updated some tests for the saturation index, please let me know if there is anything not covered yet, thank you! |
|
Thanks Yitong, the coverage looks quite comprehensive. I noticed the test is failing for |
rkingsbury
left a comment
There was a problem hiding this comment.
Thanks both! This looks pretty good. See small comments.
rkingsbury
left a comment
There was a problem hiding this comment.
Looking good; apologies I missed some of the comments from a few weeks ago. I think it just needs:
- Some clarification about how the SI is calculated in the docstring, and
- some edits to the unit tests
And will be good to go.
rkingsbury
left a comment
There was a problem hiding this comment.
Thanks @SuixiongTay ! Nice job with the additional documentation in the docstring. I've always felt that adding extra explanation makes a huge difference for making a package usable and understandable.
|
@SuixiongTay looks like we're still failing due to the |
Summary
This PR adds support for querying saturation indices (SI) through a new
get_saturation_indexmethod on theSolutionclass. The method retrieves SI from the active backendengine. This PR addresses #58.def phases(self)function insolution.pyto access the PHREEQC wrapper to retrieve the equilibrium phase data collected inpyEQL/phreeqc/core.pyget_saturation_indexso it can retrieve saturation index (SI) keys and values from the backend engineget_plotfeature within theget_saturation_index(get_plot=True)method to visualize the SI of solid and gas phases using plotly based on the phases returned from the definedengine.Below is an example for
seawater:Below is another example for a custom engine and solution:
Todos
pyEQL_db.dat. (Suggestions?)pytest