From e24fec237b2e533d0d69436a2fddb8f7778be555 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 25 Jul 2023 14:35:30 -0400 Subject: [PATCH] Remove DC cleanup This was possible thanks to https://github.com/mapping-commons/sssom/pull/302 --- pyproject.toml | 2 +- src/sssom/context.py | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 52c72b8b..0855f76a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ pansql = "^0.0.1" pyyaml = ">=6.0" rdflib = ">=6.3.2" sparqlwrapper = ">=2.0.0" -sssom-schema = ">=0.13.0" +sssom-schema = ">=0.14.0" validators = ">=0.20.0" scipy = {version = "*", extras = ["scipy"]} diff --git a/src/sssom/context.py b/src/sssom/context.py index cbec4a31..c0f94727 100644 --- a/src/sssom/context.py +++ b/src/sssom/context.py @@ -86,23 +86,9 @@ def add_built_in_prefixes_to_prefix_map( raise ValueError( f"Built-in prefix {k} is specified ({prefix_map[k]}) but differs from default ({builtinmap[k]})" ) - clean_dc(prefix_map) return prefix_map -def clean_dc(prefix_map): - """Remove a common issue with prefix maps in-place for DC/DCTERMS. - - This happens when both DC and DCTERMS are set to the new URI prefix - for DCTERMS. DC has historically been used to point to DC elements. - If this happens, then the prefix map doesn't follow the bijectivity - rule. This function deletes the DC annotation in favor of the keeping - the DCTERMS one. This should be fixed upstream in the SSSOM Schema. - """ - if "dc" in prefix_map and "dcterms" in prefix_map and prefix_map["dc"] == prefix_map["dcterms"]: - del prefix_map["dc"] - - def get_default_metadata() -> Metadata: """Get @context property value from the sssom_context variable in the auto-generated 'internal_context.py' file. @@ -125,7 +111,6 @@ def get_default_metadata() -> Metadata: del prefix_map["@vocab"] prefix_map.update({(k, v) for k, v in contxt_external.items() if k not in prefix_map}) - clean_dc(prefix_map) _raise_on_invalid_prefix_map(prefix_map) metadata = Metadata(prefix_map=prefix_map, metadata=metadata_dict)