MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / resolve_graphify_paths

Function resolve_graphify_paths

graphify/callflow_html.py:429–453  ·  view source on GitHub ↗

Resolve project root, graphify output dir, and optional files.

(args)

Source from the content-addressed store, hash-verified

427
428
429def resolve_graphify_paths(args) -> dict:
430 """Resolve project root, graphify output dir, and optional files."""
431 base = Path(args.project).expanduser() if args.project else Path.cwd()
432 if args.graphify_out:
433 graphify_out = Path(args.graphify_out).expanduser()
434 elif args.graph:
435 graphify_out = Path(args.graph).expanduser().parent
436 elif (base / "graph.json").exists():
437 graphify_out = base
438 else:
439 graphify_out = base / GRAPHIFY_OUT
440
441 project_root = graphify_out.parent if graphify_out.name == GRAPHIFY_OUT_NAME else base
442 graph = Path(args.graph).expanduser() if args.graph else graphify_out / "graph.json"
443 report = Path(args.report).expanduser() if args.report else graphify_out / "GRAPH_REPORT.md"
444 labels = Path(args.labels).expanduser() if args.labels else graphify_out / ".graphify_labels.json"
445 sections = Path(args.sections).expanduser() if args.sections else None
446 return {
447 "base": project_root,
448 "graphify_out": graphify_out,
449 "graph": graph,
450 "report": report,
451 "labels": labels,
452 "sections": sections,
453 }
454
455
456def is_zh(lang: str) -> bool:

Callers 1

write_callflow_htmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected