From a7a6cacad0bda60feeab94eb2b8d824c27a08f60 Mon Sep 17 00:00:00 2001 From: Christian Monch Date: Tue, 10 Mar 2026 16:23:56 +0100 Subject: [PATCH 1/3] ensure uniform annotations when records are stored --- dump_things_service/store/model_store.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dump_things_service/store/model_store.py b/dump_things_service/store/model_store.py index 2af9c86..2242abc 100644 --- a/dump_things_service/store/model_store.py +++ b/dump_things_service/store/model_store.py @@ -98,13 +98,19 @@ class _ModelStore: submitter: str, ) -> None: """Add submitter IRI to the record annotations, use CURIE if possible""" - if 'annotations' not in json_object: - json_object['annotations'] = {} + json_object['annotations'] = self.homogenize_annotations(json_object) submitter_curie_or_iri = self.get_curie(self.tags['id']) time_curie_or_iri = self.get_curie(self.tags['time']) json_object['annotations'][submitter_curie_or_iri] = submitter json_object['annotations'][time_curie_or_iri] = datetime.now().isoformat() + @staticmethod + def homogenize_annotations(json_object) -> dict: + return { + k: v['annotation_value'] if isinstance(v, dict) else v + for k, v in json_object.get('annotations', {}).items() + } + def get_curie( self, curie_or_iri: str, -- 2.52.0 From 70bc52d351ce52e0f9c07cfafc1333dc39aa0c5f Mon Sep 17 00:00:00 2001 From: Christian Monch Date: Tue, 10 Mar 2026 17:08:46 +0100 Subject: [PATCH 2/3] update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14557c2..10d0b85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 5.5.1 (2026-03-10) + +## Improvements + +- Ensure uniform annotation structures when records are stored. + + # 5.5.0 (2026-02-19) ## New features -- 2.52.0 From 2dd3fbfa7cf1f29804424a41046adce135a531db Mon Sep 17 00:00:00 2001 From: Christian Monch Date: Tue, 10 Mar 2026 22:08:18 +0100 Subject: [PATCH 3/3] set linkml version to >= 1.10.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d5d155..f852c96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "fastapi[standard]", "fastapi-pagination", "fsspec", - "linkml", + "linkml>=1.10.0", "pydantic", "PyYAML", "rdflib", -- 2.52.0