From 2e7cdaa5a126cc10015df826abf1fefbd978c1c0 Mon Sep 17 00:00:00 2001
From: Alexander Schlemmer <a.schlemmer@indiscale.com>
Date: Tue, 21 May 2024 14:55:06 +0200
Subject: [PATCH] DOC: a new docstring in sync_graph

---
 src/caoscrawler/sync_graph.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/caoscrawler/sync_graph.py b/src/caoscrawler/sync_graph.py
index 62b9b207..bae03c00 100644
--- a/src/caoscrawler/sync_graph.py
+++ b/src/caoscrawler/sync_graph.py
@@ -340,6 +340,8 @@ class SyncGraph():
     def _sanity_check(entities: list[db.Entity]):
         """
         Checks whether each record in entities has at least one parent.
+
+        Last review by Alexander Schlemmer on 2024-05-24.
         """
         for ent in entities:
             if ent.role == "Record" and len(ent.parents) == 0:
@@ -573,6 +575,15 @@ class SyncGraph():
                 self._set_identifiable_of_node(other_node)
 
     def _identifiable_is_needed(self, node: SyncNode):
+        """
+        This function checks:
+        - the identifiable of node is None
+        - the node has all properties that are needed for the identifiable
+        - there are no unchecked entities that are needed for the identifiable of the node,
+          neither as forward or as backward references
+
+        Last review by Alexander Schlemmer on 2024-05-24.
+        """
         return (node.identifiable is None and not self._identity_relies_on_unchecked_entity(node)
                 and self.identifiableAdapter.check_identifying_props(node, raise_exception=False))
 
-- 
GitLab