MCPcopy Create free account
hub / github.com/openai/openai-agents-python / parse_rerun_from_log

Function parse_rerun_from_log

examples/run_examples.py:594–609  ·  view source on GitHub ↗
(log_path: Path)

Source from the content-addressed store, hash-verified

592
593
594def parse_rerun_from_log(log_path: Path) -> list[str]:
595 if not log_path.exists():
596 raise FileNotFoundError(log_path)
597 rerun: list[str] = []
598 with log_path.open("r", encoding="utf-8") as handle:
599 for line in handle:
600 stripped = line.strip()
601 if not stripped or stripped.startswith("#"):
602 continue
603 parts = stripped.split()
604 if len(parts) < 2:
605 continue
606 status, relpath = parts[0].upper(), parts[1]
607 if status in {"FAILED", "ERROR", "UNKNOWN"}:
608 rerun.append(normalize_relpath(relpath))
609 return rerun
610
611
612def run_examples(examples: Sequence[ExampleScript], args: argparse.Namespace) -> int:

Callers 1

mainFunction · 0.85

Calls 4

normalize_relpathFunction · 0.85
openMethod · 0.80
appendMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected