diff --git a/pyproject.toml b/pyproject.toml index b5aca9b..418e807 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "rslv" -version = "0.11.0" +version = "0.11.1" description = "Provides an identifier resolver service in FastAPI." authors = [{ name = "datadavev", email = "605409+datadavev@users.noreply.github.com" }] requires-python = ">=3.9,<3.13" diff --git a/rslv/lib_rslv/__init__.py b/rslv/lib_rslv/__init__.py index 28eef8d..ba62e10 100644 --- a/rslv/lib_rslv/__init__.py +++ b/rslv/lib_rslv/__init__.py @@ -38,14 +38,16 @@ def split_identifier_string(pid_str: str) -> typing.Dict[str, typing.Any]: _parts = pid_str.split(":", 1) parsed["scheme"] = _parts[0].strip().lower() # Special case for URNs - if parsed["scheme"] == "urn": - _uparts = pid_str.split(":",2) - _parts = [":".join(_uparts[:2]),] - try: - _parts.append(_uparts[2]) - except IndexError: - pass - parsed["scheme"] = _parts[0].strip().lower() + #TODO: This change has unintended impacts on N2T behavior with urn tests + # Rolling back the change for later consideration. + #if parsed["scheme"] == "urn": + # _uparts = pid_str.split(":",2) + # _parts = [":".join(_uparts[:2]),] + # try: + # _parts.append(_uparts[2]) + # except IndexError: + # pass + # parsed["scheme"] = _parts[0].strip().lower() try: parsed["content"] = _parts[1].lstrip(" /:") parsed["content"] = parsed["content"].strip() # type: ignore diff --git a/tests/test_splitter.py b/tests/test_splitter.py index fbde2bd..febb728 100644 --- a/tests/test_splitter.py +++ b/tests/test_splitter.py @@ -133,16 +133,16 @@ "value": None } ), - ( - "urn:nbn:nl:ui:12-85062", - { - "pid": "urn:nbn:nl:ui:12-85062", - "scheme": "urn:nbn", - "content": "nl:ui:12-85062", - "prefix": "nl:ui:12-85062", - "value": None - } - ) + #( + # "urn:nbn:nl:ui:12-85062", + # { + # "pid": "urn:nbn:nl:ui:12-85062", + # "scheme": "urn:nbn", + # "content": "nl:ui:12-85062", + # "prefix": "nl:ui:12-85062", + # "value": None + # } + #) ) unsplit_tests = ( diff --git a/uv.lock b/uv.lock index 4a36180..e6b62ed 100644 --- a/uv.lock +++ b/uv.lock @@ -846,7 +846,7 @@ wheels = [ [[package]] name = "rslv" -version = "0.11.0" +version = "0.11.1" source = { editable = "." } dependencies = [ { name = "fastapi" },