()
| 74 | |
| 75 | |
| 76 | def main(): |
| 77 | args = parse_args() |
| 78 | cfg = build_config(args) |
| 79 | |
| 80 | data_dir = Path(args.data_path) |
| 81 | if not data_dir.exists(): |
| 82 | print(f"[Error] Data path does not exist: {data_dir}", file=sys.stderr) |
| 83 | sys.exit(1) |
| 84 | |
| 85 | builder = RecipeTextToGraphBuilder( |
| 86 | data_path=str(data_dir), |
| 87 | neo4j_uri=cfg.neo4j_uri, |
| 88 | neo4j_user=cfg.neo4j_user, |
| 89 | neo4j_password=cfg.neo4j_password, |
| 90 | working_dir=args.working_dir, |
| 91 | llm_concurrency=max(1, args.llm_concurrency), |
| 92 | domain=args.domain, |
| 93 | ) |
| 94 | builder.build() |
| 95 | print("✅ Document ingestion completed.") |
| 96 | |
| 97 | |
| 98 | if __name__ == "__main__": |
no test coverage detected