Skip to content

Vignette: How to supplement a metric repo #2

@dgkf

Description

@dgkf

As discussed in team meeting on 2025/08/21

Question came up asking how an org could mix in their own metrics. Since this might be a common fear of adoption open-source tooling, we should make it clear that we support extension and how that would be achieved.

Vignette should show:

  • how to register a new metric (can link to val.meter vignette which discusses this at length)
  • what it would look like to build a supplementary PACKAGES file containing the new metric
  • how to use metrics coming from two separate metric repositories to filter on a mix of filter criteria

For the sake of example, maybe we could

  1. Implement the "reputable_maintainer" metric - checking if R Validation Hub is the copyright holder
  2. Simulate the metric for a demo "acme" org repo
  3. Show how both metric repos can be joined and leverage our same tools to impose a filtering criteria
options(
  val.criterion.repos = c(
     "valor" = "https://pharmar.org/cran-metrics", 
     "acme" = "https://acme.org/metrics"
  ),
  available_packages_filters = package_filter({
    # is externally popular 
    percentile(valor$downloads_total) > 0.25 | 

    # has a really good maintainer
    acme$reputable_maintainer
  })
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions