From 2fcd06b39b7bc02c842f5edd0a8f59bf68df7986 Mon Sep 17 00:00:00 2001 From: Alexander Schlemmer <a.schlemmer@indiscale.com> Date: Wed, 29 May 2024 20:17:56 +0200 Subject: [PATCH] DOC: added review notes --- src/caoscrawler/identifiable_adapters.py | 5 +++++ src/caoscrawler/sync_graph.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py index 93529ca6..47023c8b 100644 --- a/src/caoscrawler/identifiable_adapters.py +++ b/src/caoscrawler/identifiable_adapters.py @@ -280,6 +280,11 @@ class IdentifiableAdapter(metaclass=ABCMeta): @staticmethod def get_identifying_referenced_entities(record, registered_identifiable): + """Create a list of all entities that are referenced by record + and that are used as identying properties of the identifiable. + + Last review by Alexander Schlemmer on 2024-05-29. + """ refs = [] for prop in registered_identifiable.properties: pname = prop.name.lower() diff --git a/src/caoscrawler/sync_graph.py b/src/caoscrawler/sync_graph.py index 81bece73..b8583277 100644 --- a/src/caoscrawler/sync_graph.py +++ b/src/caoscrawler/sync_graph.py @@ -353,6 +353,8 @@ class SyncGraph: Raises a RuntimeError if there is no equivalent node found and the (unique) string representation of the identifiable of node is already contained in the identifiable_look_up. + + Last review by Alexander Schlemmer on 2024-05-29. """ if identifiable is None: self.identifiableAdapter.all_identifying_properties_exist(node) @@ -447,6 +449,8 @@ class SyncGraph: ("_references_id_props") and one includes references that are relevant for identifying backreferences/"is_referenced_by" ("_references_backref"). I.e. the two latter are subesets of the former reference map. + + Last review by Alexander Schlemmer on 2024-05-29. """ # TODO we need to treat children of RecordTypes somehow. forward_references: dict[int, set[SyncNode]] = {} -- GitLab