From c6f14140b02ee98708a543368a87ff13c9fd15be Mon Sep 17 00:00:00 2001 From: Florian Spreckelsen <f.spreckelsen@indiscale.com> Date: Tue, 3 Dec 2024 15:41:17 +0100 Subject: [PATCH] DOC: Update compare_entities docstring --- src/linkahead/apiutils.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/linkahead/apiutils.py b/src/linkahead/apiutils.py index e887ee4..1aa127d 100644 --- a/src/linkahead/apiutils.py +++ b/src/linkahead/apiutils.py @@ -196,16 +196,20 @@ def compare_entities(entity0: Optional[Entity] = None, that are missing in the other entity, and the 'properties' dict contains properties and SPECIAL_ATTRIBUTES if they are missing or different from their counterparts in the other entity. - The key used to represent a parent or property is the entities name if the + + The key used to represent a parent in the parent list or a + property in the property dictionary is the entity's name if the name is present for both compared entities, the id otherwise. The value of the properties dict for each listed property is again a dict detailing the differences between this property and its counterpart. The characteristics that are checked to determine whether two properties match are the following: - - datatype - - importance - - value + + - datatype + - importance + - value + If any of these characteristics differ for a property, the respective string (datatype, importance, value) is added as a key to the dict of the property with its value being the characteristics value, @@ -244,6 +248,7 @@ def compare_entities(entity0: Optional[Entity] = None, entity and an int or str also checks whether the int/str matches the name or id of the entity, so Entity(id=100) == 100 == "100". + """ # ToDo: Discuss intended behaviour # Questions that need clarification: -- GitLab