From 15fdb1e7fe71579bd853badce5717bc0718c1d03 Mon Sep 17 00:00:00 2001 From: navidgh67 Date: Wed, 14 Oct 2026 11:40:01 -0400 Subject: [PATCH] Add mL/min unit for equipment inputs Offer mL/min in the equipment registration unit list and map it (and ml/min) to QUDT MilliL-PER-MIN / VolumeFlowRate. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Ppc5pC4MsLsz5apZ9qWTmq --- api/fair_ontology.py | 3 +++ api/tests/test_fair_ontology.py | 5 +++++ web/app/equipment/register/page.tsx | 1 + 3 files changed, 9 insertions(+) diff --git a/api/fair_ontology.py b/api/fair_ontology.py index a883c10..a98a372 100644 --- a/api/fair_ontology.py +++ b/api/fair_ontology.py @@ -31,6 +31,7 @@ QUDT_UNITS: dict[str, str | None] = { "CentiM3-PER-MIN": "VolumeFlowRate", "L-PER-MIN": "VolumeFlowRate", + "MilliL-PER-MIN": "VolumeFlowRate", "M3-PER-SEC": "VolumeFlowRate", "KiloGM-PER-SEC": "MassFlowRate", "W": "Power", @@ -108,6 +109,8 @@ "slpm": "L-PER-MIN", "L/min": "L-PER-MIN", "lpm": "L-PER-MIN", + "mL/min": "MilliL-PER-MIN", + "ml/min": "MilliL-PER-MIN", "m^3/s": "M3-PER-SEC", "m3/s": "M3-PER-SEC", "m³/s": "M3-PER-SEC", diff --git a/api/tests/test_fair_ontology.py b/api/tests/test_fair_ontology.py index 8237811..c2978c1 100644 --- a/api/tests/test_fair_ontology.py +++ b/api/tests/test_fair_ontology.py @@ -81,6 +81,11 @@ def test_registration_unit_options(self): {"qudt_unit": QUDT_UNIT_BASE + "M3-PER-SEC", "qudt_quantity_kind": QUDT_QK_BASE + "VolumeFlowRate"}, ) + self.assertEqual( + infer_qudt("mL/min"), + {"qudt_unit": QUDT_UNIT_BASE + "MilliL-PER-MIN", + "qudt_quantity_kind": QUDT_QK_BASE + "VolumeFlowRate"}, + ) def test_ambiguous_and_unknown_units_are_not_guessed(self): self.assertEqual(infer_qudt("A"), {}) diff --git a/web/app/equipment/register/page.tsx b/web/app/equipment/register/page.tsx index b22fbd0..c797a52 100644 --- a/web/app/equipment/register/page.tsx +++ b/web/app/equipment/register/page.tsx @@ -45,6 +45,7 @@ const UNIT_OPTIONS = [ { value: "Pa", label: "Pa" }, { value: "sccm", label: "sccm" }, { value: "SLPM", label: "SLPM" }, + { value: "mL/min", label: "mL/min" }, { value: "g", label: "g" }, { value: "kg/s", label: "kg/s" }, { value: "m^3/s", label: "m^3/s" },