Skip to content

Commit

Permalink
expose 'aggregation_period' for #8 in exported 'editor_status' fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 27, 2024
1 parent 7f5eba8 commit 643688b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashboard
Title: What the Package Does (One Line, Title Case)
Version: 0.1.3
Version: 0.1.3.001
Authors@R:
person(given = "First",
family = "Last",
Expand Down
17 changes: 14 additions & 3 deletions R/editors.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @return (Invisibly) A `data.frame` with one row per editor and some key
#' statistics.
#' @noRd
editor_gh_data <- function (quiet = FALSE, aggregation_period = "quarter") {
editor_gh_data <- function (aggregation_period = "quarter", quiet = FALSE) {

aggregation_period <- match.arg (
aggregation_period,
Expand Down Expand Up @@ -297,12 +297,23 @@ editor_reviews <- function (assignees, number, titles, state,

#' Generate a summary report of current state of all rOpenSci editors
#'
#' @param aggregation_period The time period for aggregation of timeline for
#' editorial loads. Must be one of "month", "quarter", or "semester".
#' @param quiet If `FALSE`, display progress information on screen.
#' @return A `data.frame` with one row per issue and some key statistics.
#' @export

editor_status <- function (quiet = FALSE) {
dat <- m_editor_gh_data (quiet = quiet)
editor_status <- function (quiet = FALSE, aggregation_period = "quarter") {

aggregation_period <- match.arg (
aggregation_period,
c ("month", "quarter", "semester")
)

dat <- m_editor_gh_data (
aggregation_period = aggregation_period,
quiet = quiet
)

dat$latest$status <- "FREE"
dat$latest$status [dat$latest$state == "OPEN"] <- "BUSY"
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "dashboard: What the Package Does (One Line, Title Case)",
"codeRepository": "https://github.com/ropensci-review-tools/dashboard",
"license": "https://spdx.org/licenses/MIT",
"version": "0.1.3",
"version": "0.1.3.001",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
5 changes: 4 additions & 1 deletion man/editor_status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 643688b

Please sign in to comment.