Repository navigation
refactor: move run_batch and water handling out of batch_cli - #324
Merged
Merged
Conversation
…f batch_cli batch_request holds BatchOptions and run_batch with the acid, joint, remedy and range handling; water_input holds read_water, blend and water_basis; read_json moves to inputs. batch_cli keeps argument parsing, output and exit codes. A pure move: no flag, message, exit code or output changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 145 147 +2
Lines 17441 17459 +18
Branches 3539 3539
=========================================
+ Hits 17441 17459 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #322.
run_batchandBatchOptionsmove frombatch_cli.pyto a newbatch_request.py, with the acid, formula, joint-configuration, remedy and range handling. The water reader (read_water,blend,water_basis) moves towater_input.py, andread_jsontoinputs.py(both need it, so it cannot live in either new module).batch_cli.pykeeps argument parsing,render,render_saved_result,build,mainand the exit codes.flahax; the API reference is unchanged.mix_cli,mix_tui,mix_storeandmix_sonneveldimport from the new modules;mix_clikeepslimit_entryandrenderfrombatch_cli. About 25 tests re-point their imports and patches to the module that now owns each name; no assertion changes.batch_cliandmix_water.pyis two layers (reading a water file versus prompt-time lab units), not duplicated logic. The only duplication is the HCO3 constant and the name mapping, tracked in Share the HCO3 molar mass and the N, S and P masses between mix_water and water_input #323; the S, P and N constants equalMOLAR_MASS, so there is no data difference.Verification: six
flahax batchscenarios (one blocked) and twoflahax mixsaved-session replays were captured onmainand compared after the move: 31 files identical once 64-hex hashes are masked. Every runnable test module passes;test_grower_journeywas run test by test.test_file_headersfails the same 434 cases asmainon Windows. Not run locally: the slow ratio modules (they import nothing changed) and the pre-push script (over 5 minutes). No chemistry changed, so the PHREEQC fixture is not re-captured.