INNER CODE UNIT · Python
baseline_document
MinaProtocol/mina · maintenance/deps/main.py:169
def baseline_document(graph: DuneGraph, sources: SourceIndex) -> dict[str, Any]:
"""The baseline as plain JSON-ready data. The serialization boundary."""
index = analysis.impact_index(graph)
unreferenced = sorted(
[found.source, found.dep]
for found in analysis.unreferenced_deps(graph, sources)
if analysis.impact_of(index, (found.source, found.dep)) >= analysis.IMPACT_THRESHOLD
)
return {
"_comment": list(BASELINE_COMMENT),
"entrypoints": {
node_id: {"libs": budget.libs, "opam": budget.opam}
for node_id, budget in analysis.budgets(graph).items()
},
"opam_packages": analysis.external_packages(graph),
"unreferenced": unreferenced,
}