Skip to content

Commit 55df2c1

Browse files
committed
Make sure operation doesn't override default prefix map
1 parent fa592b3 commit 55df2c1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/sssom/parsers.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
SSSOMSchemaView,
5555
)
5656

57-
from .context import HINT, ensure_converter
57+
from .context import HINT, _get_built_in_prefix_map, ensure_converter
5858
from .sssom_document import MappingSetDocument
5959
from .typehints import Metadata, MetadataType, generate_mapping_set_id, get_default_metadata
6060
from .util import (
@@ -198,12 +198,14 @@ def parse_sssom_table(
198198
meta = {}
199199

200200
# The priority order for combining prefix maps are:
201-
# 1. Internal prefix map inside the document
202-
# 2. Prefix map passed through this function inside the ``meta``
203-
# 3. Prefix map passed through this function to ``prefix_map`` (handled with ensure_converter)
204-
# 4. Default prefix map (handled with ensure_converter)
201+
# 1. Built-in prefix map
202+
# 2. Internal prefix map inside the document
203+
# 3. Prefix map passed through this function inside the ``meta``
204+
# 4. Prefix map passed through this function to ``prefix_map`` (handled with ensure_converter)
205+
# 5. Default prefix map (handled with ensure_converter)
205206
converter = curies.chain(
206207
[
208+
_get_built_in_prefix_map(),
207209
Converter.from_prefix_map(sssom_metadata.pop(CURIE_MAP, {})),
208210
Converter.from_prefix_map(meta.pop(CURIE_MAP, {})),
209211
ensure_converter(prefix_map),

0 commit comments

Comments
 (0)