WIP - Refactor PHREEQC's _setup_ppsol#397
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #397 +/- ##
==========================================
+ Coverage 86.32% 86.49% +0.16%
==========================================
Files 14 14
Lines 1865 1851 -14
Branches 328 319 -9
==========================================
- Hits 1610 1601 -9
+ Misses 209 207 -2
+ Partials 46 43 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @rkingsbury , may I have your review on this draft?
|
|
Nice work @SuixiongTay - elegant refactoring. I too am confused by the test failures - I've never seen runners crash like this. I cloned your branch and ran it locally and all tests pass - as it sounds like they do for you. It's also interesting that our CI I'm ready to merge this PR, but I want to resolve the test failure first. Let me look into it - no action needed on your end for now. @vineetbansal - do you have any ideas on what could be happening here? |
|
Strange! Let me take a look at what's happening here tomorrow. |
|
@SuixiongTay - I think a genuine bug has been introduced in this PR, and it will be worthwhile testing it out on different platforms on the CI to see if it only shows up on a mac or on multiple platforms. Can you merge latest changes from It's probably some C-level garbage-collection stuff. If we observe the crash on Linux as well (hopefully) then I can clone this branch locally and see what might be happening. |
|
Thanks @vineetbansal with your guidance on this, feel free to let me know how I can be of help! |
|
Thanks @SuixiongTay - now we see that some tests are failing anyway (these would fail locally for you as well), even outside of the segmentation fault issue. Perhaps you want to fix these so the only issues that remain are the ones you can't explain? Also, I'm not sure why the |
_setup_ppsol_setup_ppsol
|
@vineetbansal @SuixiongTay the one test failures was introduced by a marge with |
|
@SuixiongTay - I meant you will have to add |
|
@SuixiongTay - so it looks like it might not be a reproducible problem on all platforms after all. Can you confirm that the tests pass for you if you use dependencies from I'm inclined to think that but it would be nice to confirm this on a regular (i.e. non-CI) mac before going that route. |
Summary
This PR refactors the
PhreeqcEOSandPhreeqc2026EOSengines to reduce duplicated code while preserving the engine specific methods. This PR addresses #354 .PhreeqcEOSinherits the PHREEQC setup logic fromPhreeqc2026EOS, unless replaced by methods specific for that engine._setup_ppsolinPhreeqcEOSsolution input is reduced to_ppsol_dict_input._get_activity, and_get_molality.