(trajectory_path: Path)
| 77 | |
| 78 | |
| 79 | def parse_trajectory_name(trajectory_path: Path) -> Instance: |
| 80 | try: |
| 81 | round_number = int(trajectory_path.name.removesuffix(".traj.json").split("_r")[1]) |
| 82 | except: |
| 83 | print(trajectory_path) |
| 84 | raise |
| 85 | tournament_name = trajectory_path.parent.parent.parent.name |
| 86 | return Instance( |
| 87 | trajectory_path=trajectory_path, |
| 88 | player_name=trajectory_path.parent.name, |
| 89 | round_number=round_number, |
| 90 | tournament_name=tournament_name, |
| 91 | ) |
| 92 | |
| 93 | |
| 94 | def get_instances(input_folder: Path) -> list[Instance]: |
no test coverage detected