Skip to content
Snippets Groups Projects
Commit 2fcd06b3 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

DOC: added review notes

parent dce7c515
Branches
Tags
2 merge requests!178FIX: #96 Better error output for crawl.py script.,!167Sync Graph
Pipeline #51535 passed with warnings
...@@ -280,6 +280,11 @@ class IdentifiableAdapter(metaclass=ABCMeta): ...@@ -280,6 +280,11 @@ class IdentifiableAdapter(metaclass=ABCMeta):
@staticmethod @staticmethod
def get_identifying_referenced_entities(record, registered_identifiable): 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 = [] refs = []
for prop in registered_identifiable.properties: for prop in registered_identifiable.properties:
pname = prop.name.lower() pname = prop.name.lower()
......
...@@ -353,6 +353,8 @@ class SyncGraph: ...@@ -353,6 +353,8 @@ class SyncGraph:
Raises a RuntimeError if there is no equivalent node found and 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 (unique) string representation of the identifiable of node is already contained in
the identifiable_look_up. the identifiable_look_up.
Last review by Alexander Schlemmer on 2024-05-29.
""" """
if identifiable is None: if identifiable is None:
self.identifiableAdapter.all_identifying_properties_exist(node) self.identifiableAdapter.all_identifying_properties_exist(node)
...@@ -447,6 +449,8 @@ class SyncGraph: ...@@ -447,6 +449,8 @@ class SyncGraph:
("_references_id_props") and one includes references that are relevant for identifying ("_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 backreferences/"is_referenced_by" ("_references_backref"). I.e. the two latter are subesets
of the former reference map. of the former reference map.
Last review by Alexander Schlemmer on 2024-05-29.
""" """
# TODO we need to treat children of RecordTypes somehow. # TODO we need to treat children of RecordTypes somehow.
forward_references: dict[int, set[SyncNode]] = {} forward_references: dict[int, set[SyncNode]] = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment