From: Shane Jaroch Date: Fri, 23 Jan 2026 23:15:44 +0000 (-0500) Subject: huge wip X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=b186db40e174ea4038c9d852abd8bdb1be8753e9;p=gamesguru%2Fgetmyancestors.git huge wip --- diff --git a/.gitignore b/.gitignore index ab1628e..471fbfd 100644 --- a/.gitignore +++ b/.gitignore @@ -148,6 +148,7 @@ dump.rdb !.geminiignore /test_debug.py + +# Local tmp dir .tmp/ -.tmp tests/cache/ diff --git a/getmyancestors/classes/tree/core.py b/getmyancestors/classes/tree/core.py index feaee2f..d7d58cc 100644 --- a/getmyancestors/classes/tree/core.py +++ b/getmyancestors/classes/tree/core.py @@ -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) diff --git a/res/testdata b/res/testdata index e17cac6..82518a6 160000 --- a/res/testdata +++ b/res/testdata @@ -1 +1 @@ -Subproject commit e17cac6e81c2bfa63acf8027908df30efae6b799 +Subproject commit 82518a63992b6b465da6081a6d2a54d2f54708db diff --git a/tests/fixtures.env b/tests/fixtures.env index 3daa78f..e7988a9 100644 --- a/tests/fixtures.env +++ b/tests/fixtures.env @@ -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 diff --git a/tests/offline_test.py b/tests/offline_test.py index a968c93..acc0a6e 100644 --- a/tests/offline_test.py +++ b/tests/offline_test.py @@ -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!")