From d11573dfedc9078ab5201e413564ebc5c6a2b167 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Mon, 6 Nov 2023 10:05:18 +0100 Subject: [PATCH] Update util.py --- src/sssom/util.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sssom/util.py b/src/sssom/util.py index 6b78c25e..bfb430f7 100644 --- a/src/sssom/util.py +++ b/src/sssom/util.py @@ -1103,11 +1103,6 @@ def is_curie(string: str) -> bool: def is_iri(string: str) -> bool: """Check if the string is an IRI.""" - warnings.warn( - "Use :meth:`curies.Converter.is_uri` via a well-defined Converter instance", - DeprecationWarning, - stacklevel=2, - ) return validators.url(string) @@ -1128,7 +1123,12 @@ def get_prefixes_used_in_table(df: pd.DataFrame, converter: Converter) -> Set[st if col not in df.columns: continue prefixes.update( - converter.parse_curie(row).prefix for row in df[col] if converter.is_curie(row) + converter.parse_curie(row).prefix + for row in df[col] + # we don't use the converter here since get_prefixes_used_in_table + # is often used to identify prefixes that are not properly registered + # in the converter + if not is_iri(row) and is_curie(row) ) return set(prefixes)