DevCenter card from a data table column
MSALRead rows from a previously emitted data table, aggregate a numeric column across all rows for this repository, and bucket the result into ordinal DevCenter measures.
io. moderne. devcenter. BucketedMetricCardRequired
The fully qualified class name of the data table to read rows from. This data table is expected to be populated by another recipe earlier in the same recipe list.
The display name of this DevCenter card.
The numeric column of the input data table to feed into the aggregation function.
How to reduce the column's values across all rows in the repository to a single representative value before bucketing. MIN, MAX, SUM, and AVERAGE operate on numeric values of the column. COUNT returns the number of rows the upstream data table emitted for this repository, regardless of column value. UNIQUE returns the number of distinct non-null values of the column. Matching is case-insensitive.
Ordered list of buckets. Each bucket has a name and an inclusive lower bound moreThan — a value is considered to fall into the bucket when value >= moreThan. When multiple buckets apply, the one with the largest moreThan wins. The list order defines the DevCenter measure ordinal: the first bucket maps to ordinal 0, the last to ordinal size - 1. This lets callers control which end of the scale the visualization renders as "worst" (lowest ordinal) versus "best" (highest ordinal). Separate values with commas.
mod run . --recipe= io. moderne. devcenter. BucketedMetricCard \
-P inputDataTable= io. moderne. organizations. table. ClassCohesion \
-P cardName= 'Class cohesion (LCOM4)' \
-P column= lcom4 \
-P aggregation= AVERAGE \
-P buckets= '[{"name": "LOW", "moreThan": 10}, {"name": "MEDIUM", "moreThan": 3}, {"name": "HIGH", "moreThan": 0}]'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.