Skip to content

Commit

Permalink
add summary of srrTODO to srr_counts if not all stds documented
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 13, 2024
1 parent 72a3953 commit fc76896
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: roreviewapi
Title: Plumber API to report package structure and function
Version: 0.1.0.015
Version: 0.1.0.016
Authors@R:
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265"))
Expand Down
18 changes: 18 additions & 0 deletions R/srr.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@ srr_counts <- function (repourl, repo, issue_id, post_to_issue = TRUE) {
"All standards must be documented prior to submission"
)

todo <- grep ("srrstatsTODO", srr_rep)
if (length (todo) > 0L) {
srr_rep_todo <- srr_rep [seq (todo, length (srr_rep))]
ptn <- "^\\-\\sTotal\\s\\:"
srr_rep_todo_total <- gsub (ptn, "", grep (ptn, srr_rep_todo, value = TRUE))
srr_rep_todo_total <- as.integer (gsub ("^\\s|\\/.*$", "", srr_rep_todo_total))
if (srr_rep_todo_total > 0L) {
out <- c (
out, "",
paste0 (
"There are also ",
srr_rep_todo_total,
" standards with 'srrstatsTODO' tags."
)
)
}
}

} else {

out <- roreviewapi::srr_counts_summary (srr_rep)
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.015",
"version": "0.1.0.016",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit fc76896

Please sign in to comment.