Skip to contents

manifest_build() applies this rule to $metrics$label while building a manifest from scratch (E7, parity review 2026-09-24); exported here so a release-side patch can apply the SAME rule to an ALREADY-PUBLISHED manifest.json — read it back, backfill, validate_manifest(), PUT — without reaching into an internal ::: function. The two call one shared implementation, so they cannot drift apart.

Usage

manifest_labels_backfill(m)

Arguments

m

a manifest list (from manifest_build(), or jsonlite::fromJSON(simplifyVector = TRUE) of a published manifest.json) whose $metrics is a data.frame with at least metric_key

Value

the same manifest, with $metrics$label backfilled. Returned unchanged if m carries no metrics, or an empty one.

Details

A label is "blank" when the metrics$label column is absent, NA, or whitespace-only — never when it already carries a curated value (e.g. a hand-written layers_{ver}.csv entry, even a terse one like "score"): this function never overwrites an existing label.

Examples

m <- list(metrics = data.frame(metric_key = c("extrisk_bird", "score_x"),
                               label = c(NA, "score")))
manifest_labels_backfill(m)$metrics$label
#> [1] "Seabirds: extinction risk" "score"