8000 Package identity and attribution: author, Beta, Python 3.14, full data credits, CITATION references by rafatahmed · Pull Request #116 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Package identity and attribution (owner decisions 2026-10-23). Metadata: author Rafat A. Al Khashan with public contact email, maintainers Rafat A. Al Khashan and Flaha Agri Tech (affiliation), a description that names the grower command and the A/B stock planning, fuller keywords, Development Status 4 - Beta, Console and end-user audiences, Python 3.14 (now also in CI), and Changelog, Citation and Growers-guide links. NOTICE now credits every data source the package ships (USGS PHREEQC 3.8.6 minteq.v4.dat and pitzer.dat, the FlahaX chelate and phase extensions, McCleskey et al. 2012, Pethybridge et al. 2006, the CRC Handbook, Yara, the U.S. Coast Guard CHRIS database, Haifa, Sigma-Aldrich, ChemicalBook, SQM and the crop-formula authors) and reproduces the USGS User Rights Notice, which applies to PHREEQC data: it requires modified data to say what changed, by whom and when, so chemistry_25c.json and NOTICE now carry that statement (the sylvite constant, from pitzer.dat, was not credited before). CITATION.cff gains a current abstract, release date, affiliation, contact and a references list checked against Crossref. The README gains an Author and credits section; `tests/test_attribution.py` fails if a shipped data source is not credited. Zenodo archiving is documented as an owner step in the publishing procedure.
- Fix what the pre-release sweep of `flahax mix` found (19 farmer sessions, each checked across terminal, sheet at every depth and report): an unknown acid formula ('1') was accepted and the acid then silently ignored, so the plan said none was offered (#112); `flahax mix` now asks again and `flahax batch --acid` stops with the list of acids FlahaX plans with (HNO3, H3PO4, H2SO4, C6H8O7; any case). A blocked pH plan repeated its review notes (#113): a chemistry review row or advisory is listed only when not already said. A changed or new formula was titled with its file name (#114): the name typed is kept in the session and used as the title.
- Every output of one batch now agrees (#107-#110), found by generating the owner's session at all three depths. The agronomist sheet's pH path and the report's 'go from pH' used the first recipe's pH (6.71) while the report's chemistry used the weighed recipe (7.93), whose nitrate salts are reduced by the acid's nitrate: all now show the weighed recipe mixed without its reagent (`summary['ph']['mixed_ph']`), and the report also names the first recipe's pH. Weights and acid volumes use one format on the terminal, sheet and report (no more '0' weights or 86 vs 85.7 mL); each warning appears once (the pH stage no longer repeats the review rows and the iron(II) advisory); the report shows '1:100' and the status in words. A new test (`tests/test_output_consistency.py`) runs the owner's session once and checks every shared number across terminal, sheet at each depth, report and summary. Recipes and chemistry are unchanged.
- `flahax mix` finds a saved session by the name you typed (spaces, capitals, with or without `sessions/`), `flahax mix sessions` lists them, and a miss lists them too; small weights show 2-3 decimals and never read '0 g'; in fill mode the outputs say which container sets the batch ('your 10 L acid container sets the batch') (#105).
Expand Down
203 changes: 190 additions & 13 deletions
Original file line number Diff line number Diff line change
@@ -1,40 +1,217 @@
cff-version: 1.2.0
message: "If you use FlahaX, please cite it as below."
message: "If you use FlahaX, please cite it as below, and credit the data sources listed under references."
title: "FlahaX: plant-nutrient chemistry engine for fertilizer formulation and delivery planning"
abstract: >-
FlahaX is a Python package for plant nutrition. It chooses fertilizer salts
and grams so that a fixed crop formula, after subtraction of the source
water, is met; models the resulting solution with fertilizer-specific
aqueous equilibrium chemistry (speciation, precipitation and pH); plans the
acid dose to a target pH; and plans stock tanks and injection with
auditable units, model identifiers and source hashes. Chemistry results are
verified against PHREEQC.
FlahaX turns a water analysis, a crop formula and the fertilizers at hand
into a batch: the fertilizer recipe, the calculated pH, the acid-adjusted
recipe and the A/B stock tanks to prepare. Growers and agronomists use the
interactive `flahax mix` command; developers use the Python API. Underneath,
it chooses fertilizer grams by non-negative least squares so the crop
formula is met after the water's contribution; models the solution with
fertilizer-specific aqueous equilibrium chemistry (speciation, saturation
and pH) at the water's measured pH; plans the acid or base dose to a
target pH with the reagent's nutrients counted; groups products into two
concentrate tanks and checks their solubility; and records units, sources
and hashes for audit. Materials are defined by formula, ions or label
analysis. Chemistry is checked against PHREEQC 3.8.6. Pure Python, no
runtime dependencies.
type: software
authors:
- family-names: Al Khashan
given-names: Rafat A.
email: rafat.khashan82@gmail.com
affiliation: Flaha Agri Tech
orcid: https://orcid.org/0009-0009-4692-4552
- name: Flaha Agri Tech
contact:
- family-names: Al Khashan
given-names: Rafat A.
email: rafat.khashan82@gmail.com
affiliation: Flaha Agri Tech
version: 0.5.0
url: https://pypi.org/project/flahax/
date-released: "2026-10-20"
url: https://flahax.readthedocs.io/
repository-code: https://github.com/rafatahmed/Flahax
repository-artifact: https://pypi.org/project/flahax/
license: Apache-2.0
keywords:
- fertilizer
- fertigation
- hydroponics
- nutrient solution
- formulation
- non-negative least squares
- fertigation
- aqueous equilibrium
- plant nutrition
- agronomy
- stock solution
- pH
- acid dosing
- water analysis
- aqueous equilibrium
- speciation
- non-negative least squares
- PHREEQC
preferred-citation:
type: software
title: "FlahaX: plant-nutrient chemistry engine for fertilizer formulation and delivery planning"
authors:
- family-names: Al Khashan
given-names: Rafat A.
affiliation: Flaha Agri Tech
orcid: https://orcid.org/0009-0009-4692-4552
year: 2026
version: 0.5.0
url: https://pypi.org/project/flahax/
repository-code: https://github.com/rafatahmed/Flahax
license: Apache-2.0
references:
- type: report
title: >-
Description of input and examples for PHREEQC version 3: A computer
program for speciation, batch-reaction, one-dimensional transport, and
inverse geochemical calculations
authors:
- family-names: Parkhurst
given-names: David L.
- family-names: Appelo
given-names: C. A. J.
year: 2013
institution:
name: U.S. Geological Survey
collection-title: Techniques and Methods 6-A43
doi: 10.3133/tm6A43
notes: >-
Thermodynamic constants from the PHREEQC 3.8.6 databases minteq.v4.dat
and pitzer.dat (U.S. Geological Survey), converted and modified for
FlahaX; the USGS User Rights Notice is reproduced in NOTICE.
- type: database
title: "MINTEQA2 version 4 thermodynamic database (minteq.v4.dat)"
authors:
- name: U.S. Environmental Protection Agency
notes: Origin of the minteq.v4.dat constants distributed with PHREEQC.
- type: article
title: "A new method of calculating electrical conductivity with applications to natural waters"
authors:
- family-names: McCleskey
given-names: R. Blaine
- family-names: Nordstrom
given-names: D. Kirk
- family-names: Ryan
given-names: Joseph N.
- family-names: Ball
given-names: James W.
year: 2012
journal: Geochimica et Cosmochimica Acta
volume: 77
start: 369
end: 382
doi: 10.1016/j.gca.2011.10.031
notes: Conductivity coefficients (Table 1) in conductivity_mccleskey2012.json.
- type: article
title: "Precise Conductance Measurements on Dilute Aqueous Solutions of Sodium and Potassium Hydrogenphosphate and Dihydrogenphosphate"
authors:
- family-names: Pethybridge
given-names: A. D.
- family-names: Talbot
given-names: J. D. R.
- family-names: House
given-names: W. A.
year: 2006
journal: Journal of Solution Chemistry
volume: 35
start: 381
end: 393
doi: 10.1007/s10953-005-9003-z
notes: Phosphate conductance, Table IV.
- type: article
title: "Struvite precipitation thermodynamics in source-separated urine"
authors:
- family-names: Ronteltap
given-names: Mariska
- family-names: Maurer
given-names: Max
- family-names: Gujer
given-names: Willi
year: 2007
journal: Water Research
volume: 41
start: 977
end: 984
doi: 10.1016/j.watres.2006.11.046
notes: Struvite solubility product used by FlahaX.
- type: article
title: >-
Chelating Agents Related to Ethylenediamine Bis(2-hydroxyphenyl)acetic
Acid (EDDHA): Synthesis, Characterization, and Equilibrium Studies of the
Free Ligands and Their Mg2+, Ca2+, Cu2+, and Fe3+ Chelates
authors:
- family-names: Yunta
given-names: Felipe
- family-names: García-Marco
given-names: Sonia
- family-names: Lucena
given-names: Juan J.
- family-names: Gómez-Gallego
given-names: Mar
- family-names: Alcázar
given-names: Roberto
- family-names: Sierra
given-names: Miguel A.
year: 2003
journal: Inorganic Chemistry
volume: 42
start: 5412
end: 5421
doi: 10.1021/ic034333j
notes: o,o-EDDHA profile; see docs/site/models/flahax-chelate-thermodynamic-profile.md.
- type: database
title: "NIST Critically Selected Stability Constants of Metal Complexes (SRD 46)"
authors:
- name: National Institute of Standards and Technology
- family-names: Smith
given-names: R. M.
- family-names: Martell
given-names: A. E.
notes: DTPA stability-data family.
- type: book
title: "CRC Handbook of Chemistry and Physics"
authors:
- name: CRC Press
editors:
- family-names: Lide
given-names: David R.
notes: >-
Aqueous solubility of inorganic compounds at various temperatures
(pp. 8-112 to 8-117; 18 products in solubility.json) and ionic
conductivity at infinite dilution (85th ed.).
- type: generic
title: "YaraTera CALCINIT product sheet; Fertilizantes para fertirrigacion (pp. 63, 65)"
authors:
- name: Yara
notes: Calcium nitrate solubility; concentrate-tank compatibility rules.
- type: database
title: "CHRIS / CAMEO Chemicals: Urea (URE)"
authors:
- name: U.S. Coast Guard
- name: NOAA
notes: Urea solubility (item 9.24).
- type: generic
title: "Supplier technical data sheets for catalogue product assays"
authors:
- name: Haifa Group
- name: Sigma-Aldrich
- name: ChemicalBook
- name: SQM
notes: Product assays (library.json) and Ultrasol EC anchors (calculated_ec.py).
- type: generic
title: "Published crop nutrient formulas in the FlahaX formula library"
authors: 10000
- name: Howard Resh
- name: Douglas Peckenpaugh
- name: University of Florida
- name: maximumyield
- name: Growing Edge
- name: schundler.com
- family-names: Hoagland
given-names: D. R.
- family-names: Arnon
given-names: D. I.
notes: Formula names in library.json record their source.
125 changes: 125 additions & 0 deletions NOTICE
C896
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,130 @@ Licensed under the Apache License, Version 2.0. Redistributions and
derivative works must retain this NOTICE file, as section 4(d) of the
license requires.

Author and maintainer: Rafat A. Al Khashan <rafat.khashan82@gmail.com>,
ORCID https://orcid.org/0009-0009-4692-4552. Organisation: Flaha Agri Tech.

If you use FlahaX in published work, please cite it as described in
CITATION.cff.


THIRD-PARTY DATA
================

FlahaX ships numerical data from the sources below. Each value keeps its
citation in the data file named. Numerical facts are cited, not relicensed:
the Apache-2.0 license covers FlahaX's code and its own compilation, not the
underlying measurements.

1. USGS PHREEQC 3.8.6 thermodynamic data (src/flahax/data/chemistry_25c.json)
- 205 aqueous species, phases and equilibrium constants at 25 C from the
database minteq.v4.dat, distributed with PHREEQC by the U.S. Geological
Survey (source pinned by SHA-256
ab0a8f7c7375e1bd997990f4bc3a9af497516f10e57f4aaa3cefb55dccac5ae7,
https://github.com/usgs-coupled-subtrees/phreeqc3-database/blob/master/minteq.v4.dat).
minteq.v4.dat derives from the U.S. EPA MINTEQA2 version 4 database.
- Phase constants for kieserite (log K -0.123) and sylvite (log K 0.9)
from the PHREEQC 3.8.6 database pitzer.dat.
- MODIFICATIONS: these records are not the original files. Rafat A. Al
Khashan converted the 25 C constants to JSON for FlahaX (first
committed 2026-09-27), keeping only the species and phases FlahaX
uses, and added FlahaX extensions marked in the file by their own
"source" field (flahax-chelates-25c.dat, flahax-phases-25c.dat). The
original database is available from the USGS at the URL above.
- The USGS User Rights Notice for PHREEQC applies to this data and is
reproduced in full at the end of this file.
- Please acknowledge: Parkhurst, D. L. and Appelo, C. A. J. (2013)
Description of input and examples for PHREEQC version 3, U.S.
Geological Survey Techniques and Methods 6-A43, doi:10.3133/tm6A43;
and the USGS.

2. FlahaX thermodynamic extensions (chemistry_25c.json, source fields
flahax-chelates-25c.dat and flahax-phases-25c.dat)
- Struvite: Ronteltap, Maurer and Gujer (2007), Water Research 41,
977-984, doi:10.1016/j.watres.2006.11.046.
- o,o-EDDHA: Yunta et al. (2003), Inorganic Chemistry 42, 5412-5421,
doi:10.1021/ic034333j.
- DTPA: Smith and Martell critical stability constants and NIST SRD 46.
Details: docs/site/models/flahax-chelate-thermodynamic-profile.md.

3. Electrical conductivity (src/flahax/data/conductivity_mccleskey2012.json)
- McCleskey, Nordstrom, Ryan and Ball (2012), Geochimica et
Cosmochimica Acta 77, 369-382, doi:10.1016/j.gca.2011.10.031, Table 1.
- Pethybridge, Talbot and House (2006), Journal of Solution Chemistry
35, 381-393, doi:10.1007/s10953-005-9003-z, Table IV.
- CRC Handbook of Chemistry and Physics, 85th ed., Vanysek, Ionic
conductivity and diffusion at infinite dilution; PHREEQC phreeqc.dat
diffusion coefficients.
- Manufacturer EC anchors (src/flahax/calculated_ec.py): SQM, Ultrasol
Macronutrients brochure, page 2.

4. Stock solubility (src/flahax/data/solubility.json, owner-approved
2026-10-23)
- CRC Handbook of Chemistry and Physics (ed. D. R. Lide), Aqueous
Solubility of Inorganic Compounds at Various Temperatures,
pp. 8-112 to 8-117 (18 products).
- Yara, YaraTera CALCINIT product sheet (calcium nitrate, ag grade).
- U.S. Coast Guard CHRIS / NOAA CAMEO Chemicals, Urea (URE), item 9.24.

5. Fertilizer catalogue and identities (src/flahax/data/library.json,
material_identities.json)
- Product assays from supplier documents named in each record: Haifa
Group (Haifa Cal NG technical data sheet), Sigma-Aldrich (ACS reagent
specifications), ChemicalBook technical data sheets.
- Chemical identities and theoretical analyses: FlahaX materials audit,
docs/audit/2026-10-18-materials-identity.

6. Concentrate-tank compatibility (src/flahax/tank_grouping.py)
- Yara, Fertilizantes para fertirrigacion, p. 65 mixing compatibility
table and p. 63 mixing rules.

7. Crop formulas (src/flahax/data/library.json, "formulas")
- Published nutrient formulas as named in the library: Howard Resh;
Douglas Peckenpaugh; maximumyield; Growing Edge; University of
Florida; schundler.com; and the Hoagland solution (Hoagland and Arnon).

Trademarks (YaraLiva, YaraTera, Calcinit, Krista, Ultrasol, Haifa) belong
to their owners and are used only to identify sources.


USGS USER RIGHTS NOTICE (PHREEQC, applies to the data in item 1)
================================================================

This software and related material (data and (or) documentation),
contained in or furnished in connection with PHREEQC, are made available
by the U.S. Geological Survey (USGS) to be used in the public interest
and in the advancement of science. You may, without any fee or cost,
use, copy, modify, or distribute this software, and any derivative works
thereof, and its supporting documentation, subject to the following
restrictions and understandings.

If you distribute copies or modifications of the software and related
material, make sure the recipients receive a copy of this notice and
receive or can get a copy of the original distribution. If the software
and (or) related material are modified and distributed, it must be
made clear that the recipients do not have the original and they must
be informed of the extent of the modifications. For example, modified
files must include a prominent notice stating the modifications made, the
author of the modifications, and the date the modifications were made.
This restriction is necessary to guard against problems introduced in the
software by others, reflecting negatively on the reputation of the USGS.

The software is public property and you therefore have the right to
the source code, if desired.

You may charge fees for distribution, warranties, and services provided
in connection with the software or derivative works thereof. The name
USGS can be used in any advertising or publicity to endorse or promote
any products or commercial entity using this software if specific
written permission is obtained from the USGS.

The user agrees to appropriately acknowledge the authors and the USGS
in publications that result from the use of this software or in products
that include this software in whole or in part.

Although this software program has been used by the U.S. Geological
Survey (USGS), no warranty, expressed or implied, is made by the USGS
or the U.S. Government as to the accuracy and functioning of the
program and related program material nor shall the fact of distribution
constitute any such warranty, and no responsibility is assumed by the
USGS in connection therewith.
Loading
Loading
0