MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / extract_round_number

Function extract_round_number

scripts/include_cost_info_in_metadata.py:19–22  ·  view source on GitHub ↗

Extract round number from trajectory filename like player_r1.traj.json.

(filename: str)

Source from the content-addressed store, hash-verified

17
18
19def extract_round_number(filename: str) -> int | None:
20 """Extract round number from trajectory filename like player_r1.traj.json."""
21 match = re.search(r"_r(\d+)\.traj\.json$", filename)
22 return int(match.group(1)) if match else None
23
24
25def update_agent_info(agent: dict, agent_folder: Path) -> bool:

Callers 1

update_agent_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected