Region

data class Region(val id: String, val name: String, val modules: List<String>, val internalEdges: Int, val externalEdges: Int, val cohesion: Double, val subRegions: List<Region> = emptyList())(source)

One region: a group of modules treated as a unit when the project is too large to draw module by module.

Parameters

id

Stable identifier, used as a node id in the aggregated graph.

name

Display name.

modules

Module paths in this region, sorted.

internalEdges

Production edges with both ends inside the region.

externalEdges

Production edges with exactly one end inside it.

cohesion

internal / (internal + external), in [0, 1]. High cohesion means the region is a real boundary; low cohesion means the grouping cuts across how the code actually depends.

subRegions

Sub-groups, present only when the region is too large to read as one list. A declared layer can legitimately hold hundreds of modules - a :feature:** layer over 120 features - and collapsing that to a single card says nothing. Splitting it one level deeper turns the region map into a drill-down: project → region → sub-region → module.

Constructors

Link copied to clipboard
constructor(id: String, name: String, modules: List<String>, internalEdges: Int, externalEdges: Int, cohesion: Double, subRegions: List<Region> = emptyList())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard