tidyCDISC icon indicating copy to clipboard operation
tidyCDISC copied to clipboard

Add `OS Health` badge

Open AARON-CLARK opened this issue 3 years ago • 5 comments

As seen on pkgs here: https://pharmaverse.org/e2eclinical/tlg/

AARON-CLARK avatar Jun 30 '22 13:06 AARON-CLARK

@AARON-CLARK

Is the goal for these badges to be linked to Github actions?

Jeff-Thompson12 avatar Sep 20 '22 16:09 Jeff-Thompson12

@Jeff-Thompson12, that's a good question. I just checked out Tplyr's github action workflows, and there is nothing in there regarding OS Health. Actually, there is nothing I could find in the entire repo regarding OS Health (as far as I can tell).

Doing a little research, it looks like this badge's score came from a package called {GithubMetrics} and it looks like the badges are only featured on openpharma.github.io and pharamverse.org.

All that to say - we could create it manually for now (step 1) and explore a GHA workflow later (step 2).

AARON-CLARK avatar Sep 20 '22 18:09 AARON-CLARK

Yes, I've gone down this rabbit trail quite a ways today. I'm working on using the strategy of creating scripts to create the badges.

Jeff-Thompson12 avatar Sep 20 '22 18:09 Jeff-Thompson12

@Jeff-Thompson12, some additional thoughts after reviewing the riskmetric badge workflow which I found pretty easy after reviewing some example code here... This code is pretty concise and easily added to the readme. Not sure if it justifies an entirely new script but I'm open to seeing what you've got. OS health does seem a little more... involved.

To my knowledge the pkgdown GHA workflow runs build_site(), which doesn't re-build the readme.md file. But it looks like there exists a function called devtools::build_readme() which could be added to our pkgdown workflow before build_site() launches? More info on build_readme(): https://devtools.r-lib.org/reference/build_rmd.html

AARON-CLARK avatar Sep 20 '22 18:09 AARON-CLARK

I'm open to discussion on how we want to proceed. I was going to blatantly utilize the badge creation code employed by openpharma.

I was going to implement the scripts within the README.Rmd file, so the README.md file would actually be static. It would just require us to periodically re-knit the file.

Making the actual badges dynamic and connected to Github Actions seems to be a bit more involved.

Jeff-Thompson12 avatar Sep 20 '22 18:09 Jeff-Thompson12

closed with #128

AARON-CLARK avatar Dec 08 '22 18:12 AARON-CLARK