This repository builds the status badges of packages submitted to rOpenSci's software peer review, and serves them from badges.ropensci.org.
Each badge is identified by the issue number of the submission in
ropensci/software-review. For example, {epubr}
was reviewed in issue 222,
so its badge is at https://badges.ropensci.org/222_status.svg:
The package reviewed in issue XYZ can then show its badge by linking to
https://badges.ropensci.org/XYZ_status.svg.
The update-badges workflow runs every 6 hours,
on every push to main, and on demand. It:
-
runs
update_badges.R, which reads the labels of all issues inropensci/software-reviewand copies the right badge from thesvgsdirectory topkgsvgs/<issue-number>_status.svg:- a statistical software badge for issues with a
6/approved-<grade>-v<version>label, such as6/approved-gold-v0.2; peer-reviewedfor other issues labelled6/approved;pendingfor issues at stages 3 to 5;unknownfor anything else.
It also writes
pkgsvgs/json/onboarded.json, a list of packages with their review status, read from the issue labels and from thePackage:andVersion:fields of each opening comment. Issues without aPackage:field are reported in issue 24; - a statistical software badge for issues with a
-
runs
check-registry.R, which checks the package names inonboarded.jsonagainst the rOpenSci r-universe; -
deploys the
pkgsvgsdirectory to thegh-pagesbranch, which serves badges.ropensci.org.
Failures are reported in issue 18.
The source SVG files for all badges are in the svgs directory. Edit
them in a code (text) editor, not in an image editor. New badges are generally
created by copying an existing one and editing it.
Badges for statistical software packages show the version of the Statistical Software Standards current when the package was approved, coloured according to the grade of standards compliance: bronze, silver, or gold. They look like this:
Each new version of the standards needs three new badges in svgs, one per
grade, named <grade>-v<version>.svg (for example gold-v0.3.svg). Copy the
previous version's files and replace the version number near the end of each
file. Nothing else needs to change here: update_badges.R matches the labels to
the file names. The labels themselves (such as 6/approved-gold-v0.3) are added
by ropensci-review-bot when a stats submission is approved, using the
stats_badge endpoint of
roreviewapi,
which reads the current version of the standards.
- Design the new badge and save it in
svgs. - Create the matching "approved" label in the software-review
repository. It must
begin with
6/approved-, followed by the new text (note the forward slash after "6"). - Change the bot so that the
approvecommand adds the new label to the issue. The approve responder of rOpenSci's buffy shows how this is done for statistical software badges. - Change
update_badges.Rso that it maps the new label to the new badge. Labels are currently mapped to badges in the section that buildssvg_name_map.
After the script is updated, the workflow deploys the new badges and assigns them to the matching review issues.