Skip to content

Commit 9df4156

Browse files
authored
Merge pull request #20 from ropensci-review-tools/repometrics
pkg rename 'repometrics' for #19
2 parents 4884591 + ad0d30c commit 9df4156

21 files changed

+350
-343
lines changed

CONTRIBUTING.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Contributing to `github`
1+
# Contributing to `repometrics`
22

33
<!-- This CONTRIBUTING.md is adapted from https://gist.github.com/peterdesmet/e90a1b0dc17af6c12daf6e8b2f044e7c -->
44

5-
First of all, thanks for considering contributing to `githist`! 👍 It's
5+
First of all, thanks for considering contributing to `repometrics`! 👍 It's
66
people like you that make it rewarding for us - the project maintainers - to
7-
work on `githist`. 😊
7+
work on `repometrics`. 😊
88

9-
`githist` is an open source project, maintained by people who care.
9+
`repometrics` is an open source project, maintained by people who care.
1010

11-
- repo: https://github.com/ropensci-review-tools/githist
12-
- issues: https://github.com/ropensci-review-tools/githist/issues
13-
- new_issue: https://github.com/ropensci-review-tools/githist/issues/new
14-
- website: https://docs.ropensci.org/githist/
15-
- citation: https://ropensci-review-tools.github.io/githist/authors.html
11+
- repo: https://github.com/ropensci-review-tools/repometrics
12+
- issues: https://github.com/ropensci-review-tools/repometrics/issues
13+
- new_issue: https://github.com/ropensci-review-tools/repometrics/issues/new
14+
- website: https://docs.ropensci.org/repometrics/
15+
- citation: https://ropensci-review-tools.github.io/repometrics/authors.html
1616
- email: mailto:mark@ropensci.org
1717

1818
## Code of conduct
@@ -29,18 +29,18 @@ this [Open Source Guide](https://opensource.guide/how-to-contribute/).
2929

3030
### Share the love ❤️
3131

32-
Think `githist` is useful? Let others discover it, by telling them in person,
32+
Think `repometrics` is useful? Let others discover it, by telling them in person,
3333
via Twitter or a blog post.
3434

35-
Using `githist` for a paper you are writing? Consider [citing
36-
it](https://github.com/ropensci-review-tools/githist/blob/main/inst/CITATION).
35+
Using `repometrics` for a paper you are writing? Consider [citing
36+
it](https://github.com/ropensci-review-tools/repometrics/blob/main/inst/CITATION).
3737

3838
### Ask a question ⁉️
3939

40-
Using `githist` and got stuck? [Browse the
41-
documentation](https://docs.ropensci.org/githist/) to see if you can find a
40+
Using `repometrics` and got stuck? [Browse the
41+
documentation](https://docs.ropensci.org/repometrics/) to see if you can find a
4242
solution. Still stuck? Post your question as an [issue on
43-
GitHub](https://github.com/ropensci-review-tools/githist/issues). While we
43+
GitHub](https://github.com/ropensci-review-tools/repometrics/issues). While we
4444
cannot offer user support, we'll try to do our best to address it, as questions
4545
often lead to better documentation or the discovery of bugs.
4646

@@ -49,11 +49,11 @@ Want to ask a question in private? Contact the package maintainer by
4949

5050
### Propose an idea 💡
5151

52-
Have an idea for a new `githist` feature? Take a look at [the
53-
documentation](https://docs.ropensci.org/githist/) and [issues
54-
list](https://github.com/ropensci-review-tools/githist/issues) to see if it
52+
Have an idea for a new `repometrics` feature? Take a look at [the
53+
documentation](https://docs.ropensci.org/repometrics/) and [issues
54+
list](https://github.com/ropensci-review-tools/repometrics/issues) to see if it
5555
isn't included or suggested yet. If not, suggest your idea as an [issue on
56-
GitHub](https://github.com/ropensci-review-tools/githist/issues/new).
56+
GitHub](https://github.com/ropensci-review-tools/repometrics/issues/new).
5757
While we can't promise to implement your idea, it helps to:
5858

5959
* Explain in detail how it would work.
@@ -63,17 +63,17 @@ See below if you want to contribute code for your idea as well.
6363

6464
### Report a bug 🐛
6565

66-
Using `githist` and discovered a bug? That's annoying! Don't let others have
66+
Using `repometrics` and discovered a bug? That's annoying! Don't let others have
6767
the same experience and report it as an [issue on
68-
GitHub](https://github.com/ropensci-review-tools/githist/issues/new) so we can
68+
GitHub](https://github.com/ropensci-review-tools/repometrics/issues/new) so we can
6969
fix it. A good bug report makes it easier for us to do so, so please:
7070

7171
- Use [the `reprex` package](https://reprex.tidyverse.org) to create a
7272
reproducible example.
73-
- Include the version of `githist` with the following line in your `reprex`
73+
- Include the version of `repometrics` with the following line in your `reprex`
7474
code:
7575
```
76-
packageVersion("githist")
76+
packageVersion("repometrics")
7777
```
7878

7979
### Improve the documentation 📖
@@ -84,15 +84,15 @@ welcome!
8484

8585
#### The website
8686

87-
[This website](https://docs.ropensci.org/githist/) is generated with
87+
[This website](https://docs.ropensci.org/repometrics/) is generated with
8888
[`pkgdown`](http://pkgdown.r-lib.org/). That means we don't have to write any
8989
html: content is pulled together from documentation in the code, vignettes,
9090
[Markdown](https://guides.github.com/features/mastering-markdown/) files, the
9191
package `DESCRIPTION` and `_pkgdown.yml` settings. If you know your way around
9292
`pkgdown`, you can [propose a file
9393
change](https://help.github.com/articles/editing-files-in-another-user-s-repository/)
9494
to improve documentation. If not, [report an
95-
issue](https://github.com/ropensci-review-tools/githist/issues/new) and we can
95+
issue](https://github.com/ropensci-review-tools/repometrics/issues/new) and we can
9696
point you in the right direction.
9797

9898
#### Function documentation
@@ -102,7 +102,7 @@ documentation using [`roxygen2`](https://klutometis.github.io/roxygen/). If you
102102
want to improve a function description:
103103

104104
1. Go to `R/` directory in the [code
105-
repository](https://github.com/ropensci-review-tools/githist/tree/main/R).
105+
repository](https://github.com/ropensci-review-tools/repometrics/tree/main/R).
106106
2. Look for the file with the name of the function.
107107
3. [Propose a file
108108
change](https://help.github.com/articles/editing-files-in-another-user-s-repository/)
@@ -111,9 +111,9 @@ want to improve a function description:
111111

112112
### Contribute code 📝
113113

114-
Care to fix bugs or implement new functionality for `githist`? Awesome! 👏
114+
Care to fix bugs or implement new functionality for `repometrics`? Awesome! 👏
115115
Have a look at the [issue
116-
list](https://github.com/ropensci-review-tools/githist/issues) and leave a
116+
list](https://github.com/ropensci-review-tools/repometrics/issues) and leave a
117117
comment on the things you want to work on. See also the development guidelines
118118
below.
119119

@@ -122,7 +122,7 @@ below.
122122
We try to follow the [GitHub
123123
flow](https://guides.github.com/introduction/flow/) for development.
124124

125-
1. Fork [this repo](https://github.com/ropensci-review-tools/githist/) and
125+
1. Fork [this repo](https://github.com/ropensci-review-tools/repometrics/) and
126126
clone it to your computer. To learn more about this process, see [this
127127
guide](https://guides.github.com/activities/forking/).
128128
2. If you have forked and cloned the project before and it has been a while
@@ -141,11 +141,11 @@ flow](https://guides.github.com/introduction/flow/) for development.
141141

142142
## Code style
143143

144-
The `githist` coding style diverges somewhat from [the commonly used tidyverse
144+
The `repometrics` coding style diverges somewhat from [the commonly used tidyverse
145145
style guide](https://style.tidyverse.org/syntax.html#spacing), primarily
146146
through judicious use of
147147
whitespace, which aims to improve code readability. Code references in
148-
`githist` are separated by whitespace, just like words of text. Just like it
148+
`repometrics` are separated by whitespace, just like words of text. Just like it
149149
is easier to understand "these three words" than "thesethreewords", code is
150150
formatted like this:
151151

@@ -165,7 +165,7 @@ The position of brackets is then arbitrary, and we could also write
165165
these <- three( words (x))
166166
```
167167

168-
`githist` code opts for the former style, with the natural result that one
168+
`repometrics` code opts for the former style, with the natural result that one
169169
ends up writing
170170

171171
```r

DESCRIPTION

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
Package: githist
2-
Title: Code analyses traced along the 'git' history of a package
3-
Version: 0.1.0.049
1+
Package: repometrics
2+
Title: Metrics for Your Code Repository
3+
Version: 0.1.1.005
44
Authors@R:
55
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))
7-
Description: Code analyses traced along the 'git' history of a package.
7+
Description: Metrics for your code repository. Call one function to generate an
8+
interactive dashboard displaying the state of your code.
89
License: GPL-3
9-
URL: https://docs.ropensci.org/githist/,
10-
https://github.com/ropensci-review-tools/githist
11-
BugReports: https://github.com/ropensci-review-tools/githist/issues
10+
URL: https://docs.ropensci.org/repometrics/,
11+
https://github.com/ropensci-review-tools/repometrics
12+
BugReports: https://github.com/ropensci-review-tools/repometrics/issues
1213
Imports:
1314
checkmate,
1415
cli,

R/chaoss-metrics-external.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#' Extract total CRAN downloads for nominated package over period defined by
2-
#' `options("githist_period")`.
2+
#' `options("repometrics_period")`.
33
#'
44
#' @param pkg_name Name of package. For packages not on CRAN, the 'cranlogs'
55
#' API returns download counts of 0.
@@ -10,7 +10,7 @@ cran_downloads <- function (pkg_name, end_date = Sys.Date ()) {
1010

1111
checkmate::assert_character (pkg_name, len = 1L)
1212
checkmate::assert_date (end_date)
13-
period <- get_githist_period ()
13+
period <- get_repometrics_period ()
1414
start_date <- as.Date (end_date - period)
1515
interval <- paste (start_date, sep = ":", end_date)
1616

R/chaoss-metrics-internal.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
chaoss_internal_num_commits <- function (path, end_date = Sys.Date ()) {
22

3-
log <- git_log_in_period (path, end_date, get_githist_period ())
3+
log <- git_log_in_period (path, end_date, get_repometrics_period ())
44

55
return (nrow (log))
66
}
77

88
chaoss_internal_num_contributors <- function (path, end_date = Sys.Date ()) {
99

10-
log <- git_log_in_period (path, end_date, get_githist_period ())
10+
log <- git_log_in_period (path, end_date, get_repometrics_period ())
1111

1212
auths_un <- unique (log$author)
1313

R/quarto-dashboard.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ ghist_dashboard <- function (results, action = "preview") {
2424
results <- daily_average (results, "desc_data")
2525
results <- daily_average (results, "loc")
2626

27-
path_src <- system.file ("extdata", "quarto", package = "githist")
28-
dir <- fs::dir_copy (path_src, fs::path_temp ())
27+
path_src <- system.file ("extdata", "quarto", package = "repometrics")
28+
path_dest <- fs::path (fs::path_temp (), "quarto")
29+
dir <- fs::dir_copy (path_src, path_dest, overwrite = TRUE)
2930
saveRDS (results, fs::path (dir, "results.Rds"))
3031

3132
pkg_name <- results$desc_data$package [1]

R/githist-package.R R/repometrics-package.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' @keywords internal
22
#' @importFrom memoise memoise
3-
#' @aliases githist-package
3+
#' @aliases repometrics-package
44
"_PACKAGE"
55

66
# The following block is used by usethis to automatically manage

R/zzz.R

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33

44
op <- options ()
55

6-
op.githist <- list (
7-
githist_period = 90
6+
op.repometrics <- list (
7+
repometrics_period = 90
88
)
99

10-
toset <- !(names (op.githist) %in% names (op))
10+
toset <- !(names (op.repometrics) %in% names (op))
1111
if (any (toset)) {
12-
options (op.githist [toset])
12+
options (op.repometrics [toset])
1313
}
1414
invisible ()
1515
}
1616
# nocov end
1717

18-
get_githist_period <- function () {
19-
period <- getOption ("githist_period")
18+
get_repometrics_period <- function () {
19+
period <- getOption ("repometrics_period")
2020
checkmate::assert_int (period, lower = 1L)
2121
return (period)
2222
}

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<!-- badges: start -->
22

33
[![R build
4-
status](https://github.com/ropensci-review-tools/githist/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci-review-tools/githist/actions?query=workflow%3AR-CMD-check)
5-
[![codecov](https://codecov.io/gh/ropensci-review-tools/githist/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ropensci-review-tools/githist)
4+
status](https://github.com/ropensci-review-tools/repometrics/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci-review-tools/repometrics/actions?query=workflow%3AR-CMD-check)
5+
[![codecov](https://codecov.io/gh/ropensci-review-tools/repometrics/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ropensci-review-tools/repometrics)
66
[![Project Status:
77
Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
88
<!-- badges: end -->
99

10-
# githist
10+
# repometrics
1111

12-
Code analyses run over the git history of a package.
12+
Metrics for your code repository.
1313

1414
## Code of Conduct
1515

codemeta.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
33
"@type": "SoftwareSourceCode",
4-
"identifier": "githist",
5-
"description": "Code analyses traced along the 'git' history of a package.",
6-
"name": "githist: Code analyses traced along the 'git' history of a package",
7-
"relatedLink": "https://docs.ropensci.org/githist/",
8-
"codeRepository": "https://github.com/ropensci-review-tools/githist",
9-
"issueTracker": "https://github.com/ropensci-review-tools/githist/issues",
4+
"identifier": "repometrics",
5+
"description": "Metrics for your code repository. Call one function to generate an interactive dashboard displaying the state of your code.",
6+
"name": "repometrics: Metrics for Your Code Repository",
7+
"relatedLink": "https://docs.ropensci.org/repometrics/",
8+
"codeRepository": "https://github.com/ropensci-review-tools/repometrics",
9+
"issueTracker": "https://github.com/ropensci-review-tools/repometrics/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.1.0.049",
11+
"version": "0.1.1.005",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",
@@ -225,11 +225,11 @@
225225
},
226226
"SystemRequirements": {}
227227
},
228-
"fileSize": "90.739KB",
229-
"readme": "https://github.com/ropensci-review-tools/githist/blob/main/README.md",
228+
"fileSize": "125.292KB",
229+
"readme": "https://github.com/ropensci-review-tools/repometrics/blob/main/README.md",
230230
"contIntegration": [
231-
"https://github.com/ropensci-review-tools/githist/actions?query=workflow%3AR-CMD-check",
232-
"https://app.codecov.io/gh/ropensci-review-tools/githist"
231+
"https://github.com/ropensci-review-tools/repometrics/actions?query=workflow%3AR-CMD-check",
232+
"https://app.codecov.io/gh/ropensci-review-tools/repometrics"
233233
],
234234
"developmentStatus": "https://www.repostatus.org/#active"
235235
}

inst/extdata/quarto/_quarto.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ website:
1212
- icon: "github"
1313
menu:
1414
- text: Source Code
15-
url: https://github.com/ropensci-review-tools/githist
15+
url: https://github.com/ropensci-review-tools/repometrics
1616
- text: Request a Feature
17-
url: https://github.com/ropensci-review-tools/githist/issues/new
17+
url: https://github.com/ropensci-review-tools/repometrics/issues/new
1818

1919
format:
2020
html:

inst/extdata/quarto/fn-stats.qmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ format:
1010
---
1111

1212
```{r load-pkg, echo = FALSE, message = FALSE}
13-
library (githist)
13+
library (repometrics)
1414
library (lubridate)
1515
```
1616
This page includes several graphs providing insight into the historical

inst/httptest2/redact.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function (resp) {
1414
fixed = TRUE
1515
)
1616

17-
test_repo <- "ropensci-review-tools/githist"
17+
test_repo <- "ropensci-review-tools/repometrics"
1818
resp <- httptest2::gsub_response (
1919
resp,
2020
paste0 (test_repo, "/actions"),

man/githist-package.Rd

-23
This file was deleted.

0 commit comments

Comments
 (0)