8000 A water report without chloride closes on its alkalinity instead of blocking (#100) by rafatahmed · Pull Request #104 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

A water report without chloride closes on its alkalinity instead of blocking (#100) - #104

Merged
rafatahmed merged 1 commit into
mainfrom
fix/close-on-alkalinity
Oct 23, 2026
Merged

rafatahmed merged 1 commit into
mainfrom
fix/close-on-alkalinity

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

Owner decision 2026-10-23 on #100, replacing the 'ask your lab' messages merged in #101.

Why balancing exists

Every lab report is slightly out of charge balance (each value has a measurement error). To calculate the pH of the mix, and so the acid, FlahaX closes that small gap at the measured pH. Until now it could only adjust chloride, so a clean report with no chloride was blocked.

Change

  • balance_water_analysis: when the default balance ion Cl- is not measured, zero or below detection and the analysis has carbonate, the gap is closed on the carbonate (secant on total inorganic carbon at the measured pH): reconciliation='closed_on_alkalinity', balance_ion='CO3-2'. Chloride stays as reported. A named Na+ is never switched. Reports beyond the 5 % screen are still refused.
  • It is noted in the full report only ('has no chloride, so it is closed on the alkalinity') and does not put the plan in review; the grower's sheet and terminal say nothing about it.
  • flahax mix no longer prints the chloride note at entry.
  • Explanations: the growers page gains 'Why FlahaX needs your water's pH and balances the lab report'; the report's water section explains it in one paragraph. RO water is unaffected.
  • Docs (grower outputs, water-to-delivery, manual error table) and CHANGELOG updated.

Tests

New NoChlorideTests (not measured and measured zero both close on alkalinity, charge closes, chloride stays zero, analysis kept; chloride present still closes on chloride). The #84 test for a measured-zero chloride now checks that chloride is untouched and the carbonate closes it. flahax mix test: a balanced report without chloride gives a ready sheet that never mentions chloride, and the full report carries the note.

514 tests with live PHREEQC required; strict Sphinx build; tools/verify_distribution.py PASS.

@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 Flahax | 🛠️ Build #35341017 | 📁 Comparing aa2610f against latest (a9bbf97)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

@rafatahmed
rafatahmed merged commit e50b9d3 into main Oct 23, 2026
6 checks passed
@rafatahmed
rafatahmed deleted the fix/close-on-alkalinity branch October 23, 2026 00:48
@rafatahmed rafatahmed self-assigned this Oct 23, 2026
rafatahmed added a commit that referenced this pull request Nov 7, 2026
A water report without chloride closes on its alkalinity instead of blocking (#100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0