Skip to content

Commit

Permalink
rename fn -> 'repometrics_dashboard'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Dec 6, 2024
1 parent 819c90a commit ce7e62c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 36 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.2.035
Version: 0.1.2.036
Authors@R:
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265"))
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(cm_data)
export(ghist_dashboard)
export(repo_pkgstats_history)
export(repometrics_dashboard)
export(repometrics_data)
importFrom(memoise,memoise)
4 changes: 2 additions & 2 deletions R/quarto-dashboard.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Start quarto dashboard with results of main \link{repo_pkgstats_history}
#' Start quarto dashboard with results of main \link{repometrics_data}
#' function.
#'
#' @param data Results of main \link{repometrics_data} function applied
Expand All @@ -10,7 +10,7 @@
#' that the site must be served with `action = "preview"`, and will not work by
#' simply opening this "index.html" file.
#' @export
ghist_dashboard <- function (data, action = "preview") {
repometrics_dashboard <- function (data, action = "preview") {

check_dashboard_arg (data)
data$pkgstats <- timestamps_to_dates (data$pkgstats)
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.2.035",
"version": "0.1.2.036",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
26 changes: 0 additions & 26 deletions man/ghist_dashboard.Rd

This file was deleted.

10 changes: 5 additions & 5 deletions tests/testthat/test-dashboard.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@ test_that ("dashboard input errors", {

data <- data0
expect_error (
ghist_dashboard (data, action = "noarg"),
repometrics_dashboard (data, action = "noarg"),
"\\'arg\\' should be one of"
)
names (data) [1] <- "changed"
expect_error (
ghist_dashboard (data, action = "render"),
repometrics_dashboard (data, action = "render"),
"Assertion on \\'names\\(data\\)\\' failed\\: Names must be "
)

data$pkgstats$stats <- data$pkgstats$stats [, -1]
expect_error (
ghist_dashboard (data, action = "render"),
repometrics_dashboard (data, action = "render"),
"Assertion on \\'names\\(data\\)\\' failed\\: Names must be "
)

data <- data0
data$pkgstats$stats <- data$pkgstats$stats [-seq_len (nrow (data$pkgstats$stats)), ]
expect_error (
ghist_dashboard (data, action = "render"),
repometrics_dashboard (data, action = "render"),
"\\'data\\' contains empty tables."
)
})

test_that ("dashboard build", {

data <- data0
ghist_dashboard (data, action = "render")
repometrics_dashboard (data, action = "render")

# Expect quarto docs to have been modified with package name:
pkg_name <- data0$pkgstats$desc_data$package [1]
Expand Down

0 comments on commit ce7e62c

Please sign in to comment.