Skip to content

Commit

Permalink
more consistent names of main fns
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Dec 10, 2024
1 parent dbb5b2b commit 6ec5f22
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: repometrics
Title: Metrics for Your Code Repository
Version: 0.1.3.005
Version: 0.1.3.006
Authors@R:
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265"))
Expand Down
4 changes: 2 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

export(repo_pkgstats_history)
export(repometrics_dashboard)
export(repometrics_pkg_data)
export(repometrics_user_data)
export(repometrics_data_pkg)
export(repometrics_data_user)
importFrom(memoise,memoise)
5 changes: 1 addition & 4 deletions R/data-repo.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' }
#'
#' @export
repometrics_pkg_data <- function (path, step_days = 1L, num_cores = -1L) {
repometrics_data_pkg <- function (path, step_days = 1L, num_cores = -1L) {

cli::cli_alert_info ("Extracting package statistics ...")
pkgstats <- repo_pkgstats_history (
Expand Down Expand Up @@ -81,9 +81,6 @@ get_rm_data_fns <- function () {
data_fns <- data_fns [which (!grepl ("\\_internal$", data_fns))]
data_fns <- data_fns [which (!data_fns == "rm_data_repo")]

index <- grep ("user", data_fns)
data_fns <- data_fns [-index]

return (data_fns)
}

Expand Down
2 changes: 1 addition & 1 deletion R/data-user.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' \item `issues` with information on all issues opened by user
#' }
#' @export
repometrics_user_data <- function (login,
repometrics_data_user <- function (login,
ended_at = Sys.time (),
nyears = 1,
n_per_page = 100) {
Expand Down
4 changes: 2 additions & 2 deletions R/quarto-dashboard.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Start quarto dashboard with results of main \link{repometrics_pkg_data}
#' Start quarto dashboard with results of main \link{repometrics_data_pkg}
#' function.
#'
#' @param data Results of main \link{repometrics_pkg_data} function applied to
#' @param data Results of main \link{repometrics_data_pkg} function applied to
#' one package.
#' @param action One of "preview", to start and open a live preview of the
#' dashboard website, or "render" to render a static version without previewing
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/repometrics",
"issueTracker": "https://github.com/ropensci-review-tools/repometrics/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.3.005",
"version": "0.1.3.006",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
6 changes: 3 additions & 3 deletions man/repometrics_dashboard.Rd

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

6 changes: 3 additions & 3 deletions man/repometrics_pkg_data.Rd → man/repometrics_data_pkg.Rd

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

6 changes: 3 additions & 3 deletions man/repometrics_user_data.Rd → man/repometrics_data_user.Rd

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

4 changes: 2 additions & 2 deletions tests/testthat/test-rm-data-gh-user.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ test_that ("rm user data internal structures", {
expect_named (dat$issue_cmts, nms)
})

test_that ("rm_data_user fn", {
test_that ("repometrics_data_user fn", {

Sys.setenv ("REPOMETRICS_TESTS" = "true")
dat_mocked <- mock_rm_data (repo = FALSE)

login <- "mpadge"
ended_at <- as.POSIXct ("2024-01-01T00:00:00")

dat <- rm_data_user (
dat <- repometrics_data_user (
login = login,
n_per_page = 1,
ended_at = ended_at,
Expand Down

0 comments on commit 6ec5f22

Please sign in to comment.