You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CURIEs in a CSV go stale over time — an identifier that resolved correctly when the sheet was first filled in may no longer be canonical in NodeNorm. This mode detects those cases and suggests replacements by looking up the label via NameRes.
If the CURIE resolves and is already the preferred ID → keep it.
If the CURIE resolves but the preferred ID differs → replace the CURIE with the preferred ID and emit a # was: <old> comment or stderr note.
If the CURIE does not resolve at all → call CachedNameRes.lookup(label, limit=1) and substitute the top-result CURIE (with a # resolved from label note); warn if no result.
Output could be a rewritten CSV (stdout) or the usual BabelTests YAML block with updated CURIEs and provenance comments.
Implementation notes
Both CachedNodeNorm and CachedNameRes are already available in the tool.
Summary
CURIEs in a CSV go stale over time — an identifier that resolved correctly when the sheet was first filled in may no longer be canonical in NodeNorm. This mode detects those cases and suggests replacements by looking up the label via NameRes.
Proposed interface
For each row:
CachedNodeNorm.normalize_curies([curie]).# was: <old>comment or stderr note.CachedNameRes.lookup(label, limit=1)and substitute the top-result CURIE (with a# resolved from labelnote); warn if no result.Output could be a rewritten CSV (stdout) or the usual BabelTests YAML block with updated CURIEs and provenance comments.
Implementation notes
CachedNodeNormandCachedNameResare already available in the tool.--update-stale-curiesflag is a natural companion to--resolve-from-label(issue csv-to-babeltests: --resolve-from-label (NameRes-assisted CURIE population) #78) — both need theNameResURLfromtargets.ini, so extendingload_nodenorm_urlto return both URLs is a prerequisite shared by both issues.--dry-runsub-flag that prints a diff to stderr without modifying the output.Related
This tool is being developed at #77