From 57263428cada35bcabc68ec751b647f6214ee421 Mon Sep 17 00:00:00 2001 From: mpadge Date: Mon, 16 Sep 2024 18:02:55 +0200 Subject: [PATCH] export 'srr_counts_from_report' fn --- DESCRIPTION | 2 +- NAMESPACE | 1 + R/srr.R | 9 ++++++++- codemeta.json | 2 +- man/check_issue_template.Rd | 1 + man/is_user_authorized.Rd | 1 + man/push_to_gh_pages.Rd | 1 + man/readme_has_peer_review_badge.Rd | 1 + man/srr_counts.Rd | 1 + man/srr_counts_summary.Rd | 1 + man/stats_badge.Rd | 1 + 11 files changed, 18 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ba757d1..721a713 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: roreviewapi Title: Plumber API to report package structure and function -Version: 0.1.0.052 +Version: 0.1.0.053 Authors@R: person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")) diff --git a/NAMESPACE b/NAMESPACE index ae750b1..84ca5a3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,6 +14,7 @@ export(readme_badge) export(readme_has_peer_review_badge) export(serve_api) export(srr_counts) +export(srr_counts_from_report) export(srr_counts_summary) export(stats_badge) export(stdout_stderr_cache) diff --git a/R/srr.R b/R/srr.R index cd6f0cb..1172bb6 100644 --- a/R/srr.R +++ b/R/srr.R @@ -48,7 +48,7 @@ srr_counts <- function (repourl, repo, issue_id, post_to_issue = TRUE) { return (out) } - out <- srr_counts_from_report (srr_rep) + out <- srr::srr_counts_from_report (srr_rep) if (post_to_issue) { @@ -58,6 +58,13 @@ srr_counts <- function (repourl, repo, issue_id, post_to_issue = TRUE) { return (out) } +#' Extract final counts of 'srr' standards from the report +#' +#' @param srr_rep An 'srr' report generated by the `srr::srr_report()` function. +#' @return Character vector with markdown-formatted summary summary of numbers +#' of standards complied with. +#' @family ropensci +#' @export srr_counts_from_report <- function (srr_rep) { index <- grep ("heavy_multiplication_x\\:\\s+Error\\:", srr_rep) diff --git a/codemeta.json b/codemeta.json index b8d2ca7..ee0078f 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,7 +8,7 @@ "codeRepository": "https://github.com/ropensci-review-tools/roreviewapi", "issueTracker": "https://github.com/ropensci-review-tools/roreviewapi/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.1.0.052", + "version": "0.1.0.053", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", diff --git a/man/check_issue_template.Rd b/man/check_issue_template.Rd index c246d67..cb51d8f 100644 --- a/man/check_issue_template.Rd +++ b/man/check_issue_template.Rd @@ -24,6 +24,7 @@ Other ropensci: \code{\link{push_to_gh_pages}()}, \code{\link{readme_has_peer_review_badge}()}, \code{\link{srr_counts}()}, +\code{\link{srr_counts_from_report}()}, \code{\link{srr_counts_summary}()}, \code{\link{stats_badge}()} } diff --git a/man/is_user_authorized.Rd b/man/is_user_authorized.Rd index de4f4d1..872b013 100644 --- a/man/is_user_authorized.Rd +++ b/man/is_user_authorized.Rd @@ -23,6 +23,7 @@ Other ropensci: \code{\link{push_to_gh_pages}()}, \code{\link{readme_has_peer_review_badge}()}, \code{\link{srr_counts}()}, +\code{\link{srr_counts_from_report}()}, \code{\link{srr_counts_summary}()}, \code{\link{stats_badge}()} } diff --git a/man/push_to_gh_pages.Rd b/man/push_to_gh_pages.Rd index 9ab5257..7eea263 100644 --- a/man/push_to_gh_pages.Rd +++ b/man/push_to_gh_pages.Rd @@ -23,6 +23,7 @@ Other ropensci: \code{\link{is_user_authorized}()}, \code{\link{readme_has_peer_review_badge}()}, \code{\link{srr_counts}()}, +\code{\link{srr_counts_from_report}()}, \code{\link{srr_counts_summary}()}, \code{\link{stats_badge}()} } diff --git a/man/readme_has_peer_review_badge.Rd b/man/readme_has_peer_review_badge.Rd index 264363a..ba95258 100644 --- a/man/readme_has_peer_review_badge.Rd +++ b/man/readme_has_peer_review_badge.Rd @@ -24,6 +24,7 @@ Other ropensci: \code{\link{is_user_authorized}()}, \code{\link{push_to_gh_pages}()}, \code{\link{srr_counts}()}, +\code{\link{srr_counts_from_report}()}, \code{\link{srr_counts_summary}()}, \code{\link{stats_badge}()} } diff --git a/man/srr_counts.Rd b/man/srr_counts.Rd index c63dea2..b34102e 100644 --- a/man/srr_counts.Rd +++ b/man/srr_counts.Rd @@ -38,6 +38,7 @@ Other ropensci: \code{\link{is_user_authorized}()}, \code{\link{push_to_gh_pages}()}, \code{\link{readme_has_peer_review_badge}()}, +\code{\link{srr_counts_from_report}()}, \code{\link{srr_counts_summary}()}, \code{\link{stats_badge}()} } diff --git a/man/srr_counts_summary.Rd b/man/srr_counts_summary.Rd index d835103..9008b51 100644 --- a/man/srr_counts_summary.Rd +++ b/man/srr_counts_summary.Rd @@ -27,6 +27,7 @@ Other ropensci: \code{\link{push_to_gh_pages}()}, \code{\link{readme_has_peer_review_badge}()}, \code{\link{srr_counts}()}, +\code{\link{srr_counts_from_report}()}, \code{\link{stats_badge}()} } \concept{ropensci} diff --git a/man/stats_badge.Rd b/man/stats_badge.Rd index f26863d..63e5d61 100644 --- a/man/stats_badge.Rd +++ b/man/stats_badge.Rd @@ -25,6 +25,7 @@ Other ropensci: \code{\link{push_to_gh_pages}()}, \code{\link{readme_has_peer_review_badge}()}, \code{\link{srr_counts}()}, +\code{\link{srr_counts_from_report}()}, \code{\link{srr_counts_summary}()} } \concept{ropensci}