From 40ea17f2cd1ee9a5cd50c220ccad304769db9a68 Mon Sep 17 00:00:00 2001 From: SkyeAv Date: Wed, 29 Jul 2026 12:48:21 -0700 Subject: [PATCH 1/2] fix(nodenorm): stop asserting babel_version on NodeNorm status The NodeNorm `/status` endpoint does not report `babel_version` or `babel_version_url` (that compendia metadata is exposed by the NameRes `/status` endpoint, whose test still passes). Asserting those keys on NodeNorm raised `KeyError: 'babel_version'` and failed CI. Assert only the fields NodeNorm actually returns: `status` and the underlying Redis database counts. --- tests/test_nodenorm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_nodenorm.py b/tests/test_nodenorm.py index 073d9f2..eb83623 100644 --- a/tests/test_nodenorm.py +++ b/tests/test_nodenorm.py @@ -76,12 +76,15 @@ def test_nodenorm_status(): """ Test that NodeNorm can return status information. + + Note: unlike NameRes, the NodeNorm ``/status`` endpoint does not report a + ``babel_version`` (that compendia metadata lives on the NameRes status), so + we only assert the fields NodeNorm actually exposes: ``status`` and the + underlying database counts. """ status = TCT.node_normalizer.status() assert status['status'] == 'running' - assert status['babel_version'] != '' - assert status['babel_version_url'] != '' assert status['databases']['eq_id_to_id_db']['count'] > 650_000_000 From c4f15e06515cad87fb617bd61d990dd859f96ede Mon Sep 17 00:00:00 2001 From: SkyeAv Date: Wed, 29 Jul 2026 12:50:31 -0700 Subject: [PATCH 2/2] test(nodenorm): refresh expectations for Babel compendia drift Two NodeNorm normalization examples had drifted from the current NCATSTranslator/Babel compendia and failed CI: - UMLS:C0004096 (asthma): preferred CURIE MONDO:0004979 -> MONDO:0100470, label 'asthma' -> 'Asthma'. - DRUGBANK:DB00083 (botulinum toxin type A): preferred CURIE UMLS:C0006050 -> DRUGBANK:DB00083, label 'Dysport' -> 'Botulinum toxin type A', category biolink:Protein -> biolink:ChemicalEntity. Also document at EXAMPLE_QUERIES that these expectations track the live Babel-backed NodeNorm service and may need a periodic refresh. --- tests/test_nodenorm.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/test_nodenorm.py b/tests/test_nodenorm.py index eb83623..6e13775 100644 --- a/tests/test_nodenorm.py +++ b/tests/test_nodenorm.py @@ -2,6 +2,12 @@ import TCT # Some example queries for these tests. +# +# NOTE: the expected `curie`/`label`/`biolink_type` values below are pinned to +# the Translator NodeNorm service, which is backed by the NCATSTranslator/Babel +# compendia. When Babel ships a new compendia release, preferred CURIEs, labels +# (including casing) and categories can shift, so these expectations may need a +# periodic refresh. EXAMPLE_QUERIES = [ { 'query': 'MESH:D003924', @@ -13,9 +19,9 @@ }, { 'query': 'UMLS:C0004096', - 'curie': 'MONDO:0004979', + 'curie': 'MONDO:0100470', 'label_with_geneprotein_conflation': 'Asthma', - 'label': 'asthma', + 'label': 'Asthma', 'biolink_type': 'biolink:Disease', 'drug_chemical_conflate': True, 'conflate': True, @@ -31,10 +37,10 @@ }, { 'query': 'DRUGBANK:DB00083', - 'curie': 'UMLS:C0006050', + 'curie': 'DRUGBANK:DB00083', 'label_with_geneprotein_conflation': 'Botulinum toxin type A', - 'label': 'Dysport', - 'biolink_type': 'biolink:Protein', + 'label': 'Botulinum toxin type A', + 'biolink_type': 'biolink:ChemicalEntity', 'drug_chemical_conflate': True, 'conflate': True, },