File size: 469 Bytes
e00f999
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""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)