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)
# 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
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"]
)
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!")