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

Function load_metadata

codeclash/viewer/app.py:357–367  ·  view source on GitHub ↗

Load metadata.json from log directory and return Metadata object

(log_dir: Path)

Source from the content-addressed store, hash-verified

355
356
357def load_metadata(log_dir: Path) -> Metadata:
358 """Load metadata.json from log directory and return Metadata object"""
359 metadata_file = log_dir / "metadata.json"
360 if not metadata_file.exists():
361 return Metadata()
362
363 try:
364 data = json.loads(metadata_file.read_text())
365 return Metadata(data)
366 except (json.JSONDecodeError, OSError):
367 return Metadata()
368
369
370def get_agent_info_from_metadata(metadata: Metadata) -> list[AgentInfo]:

Callers 3

_load_game_metadataFunction · 0.85
_get_metadataMethod · 0.85
guess_config_namesFunction · 0.85

Calls 1

MetadataClass · 0.85

Tested by

no test coverage detected