]> Nutra Git (v1) - gamesguru/getmyancestors.git/commitdiff
huge wip
authorShane Jaroch <chown_tee@proton.me>
Fri, 23 Jan 2026 23:15:44 +0000 (18:15 -0500)
committerShane Jaroch <chown_tee@proton.me>
Fri, 23 Jan 2026 23:15:44 +0000 (18:15 -0500)
.gitignore
getmyancestors/classes/tree/core.py
res/testdata
tests/fixtures.env
tests/offline_test.py

index ab1628e708df4aa2fde877bbb876c9bd63817f6e..471fbfdfd8bed21f9ebedf3078fa19314915e740 100644 (file)
@@ -148,6 +148,7 @@ dump.rdb
 !.geminiignore
 /test_debug.py
 
+
+# Local tmp dir
 .tmp/
-.tmp
 tests/cache/
index feaee2ffc3344c724a719ed652e809a0368fde77..d7d58ccfc07a9360e4376cd3e499e85949006764 100644 (file)
@@ -175,26 +175,32 @@ class Indi:
                         self.facts.add(
                             Fact(x, self.tree, num_prefix=f"INDI_{self.fid}")
                         )
-            if "sources" in data and self.tree and self.tree.fs:
-                sources = self.tree.fs.get_url(
-                    "/platform/tree/persons/%s/sources" % self.fid
-                )
-                if sources:
-                    for quote in sources["persons"][0]["sources"]:
-                        source_id = quote["descriptionId"]
-                        source_data = next(
-                            (
-                                s
-                                for s in sources["sourceDescriptions"]
-                                if s["id"] == source_id
-                            ),
-                            None,
-                        )
-                        source = (
-                            self.tree.ensure_source(source_data)
-                            if self.tree and source_data
-                            else None
-                        )
+        if "sources" in data and self.tree and self.tree.fs:
+            sources = self.tree.fs.get_url(
+                "/platform/tree/persons/%s/sources" % self.fid
+            )
+            if sources:
+                for quote in sources["persons"][0]["sources"]:
+                    source_id = quote["descriptionId"]
+                    source_data = next(
+                        (
+                            s
+                            for s in sources["sourceDescriptions"]
+                            if s["id"] == source_id
+                        ),
+                        None,
+                    )
+                    if self.tree:
+                        if source_data:
+                            source = self.tree.ensure_source(source_data)
+                        else:
+                            existing_source = self.tree.sources.get(source_id)
+                            if existing_source:
+                                source = existing_source
+                            else:
+                                source = self.tree.ensure_source({"id": source_id})
+                    else:
+                        source = None
                         if source and self.tree:
                             citation = self.tree.ensure_citation(quote, source)
                             self.citations.add(citation)
index e17cac6e81c2bfa63acf8027908df30efae6b799..82518a63992b6b465da6081a6d2a54d2f54708db 160000 (submodule)
@@ -1 +1 @@
-Subproject commit e17cac6e81c2bfa63acf8027908df30efae6b799
+Subproject commit 82518a63992b6b465da6081a6d2a54d2f54708db
index 3daa78f7e62d52ad4f42184cc19efe3157af7475..e7988a9e89ad7de4be3386f565aa93499cb1cda8 100644 (file)
@@ -2,6 +2,6 @@
 # Shared expectations for test fixtures
 # These values are baselined from "Live" fixture generation
 # and should be updated whenever fixtures are regenerated.
-export EXPECTED_ADA_LINES=11587
-export EXPECTED_MARIE_LINES=3698
-export EXPECTED_MERGED_LINES=14480
+export EXPECTED_ADA_LINES=10902
+export EXPECTED_MARIE_LINES=3444
+export EXPECTED_MERGED_LINES=13536
index a968c933cf3607cd579dfaa59e6c567a4d3809f4..acc0a6e558007841fd098015bce56a2c14d32bc7 100644 (file)
@@ -156,6 +156,7 @@ def test_offline():
     env["FAMILYSEARCH_PASS"] = env.get("FAMILYSEARCH_PASS", "dummy_password")
     env["GMA_OFFLINE_MODE"] = "1"
     env["GMA_DEBUG"] = "1"
+    env["PYTHONHASHSEED"] = "0"
     if "NO_CACHE" in env:
         del env["NO_CACHE"]
 
@@ -352,7 +353,9 @@ def test_offline():
     )
 
     if not all_matched:
-        print("❌ Offline Test Failed due to artifact mismatch")
+        print(
+            "❌ Offline Test Failed due to artifact mismatch (One of Part1, Part2, or Merged)"
+        )
         sys.exit(1)
 
     print("✅ Offline Test Complete!")