ModuleMap-Bench / scripts /common.py
alejandrosalastexido's picture
ModuleMap-Bench 1.0.0
e00f999 verified
Raw History Blame Contribute Delete
469 Bytes
"""Shared helpers for the ModuleMap-Bench scripts: Python 3.8+, standard library only."""
import json
import os
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ROLES = ["entry", "client", "service", "domain", "persistence", "event", "config", "none"]
def read_jsonl(path):
with open(path, encoding="utf-8") as f:
return [json.loads(line) for line in f if line.strip()]
def data(*parts):
return os.path.join(ROOT, "data", *parts)