Skip to content

Commit ac7ae31

Browse files
authored
Merge pull request #138 from ropensci-review-tools/models-data
finally include metrics & models data for #124 in main output
2 parents 2ab9f46 + cf7692b commit ac7ae31

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: repometrics
22
Title: Metrics for Your Code Repository
3-
Version: 0.1.6.145
3+
Version: 0.2.0
44
Authors@R:
55
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

R/data-repo.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ repometrics_data <- function (path, step_days = 1L, num_cores = -1L,
7272

7373
data$contributors <- data_ctbs
7474

75-
# dataa$cm_metrics <- collate_all_metrics (path, end_date = end_date)
76-
# dataa$cm_models <- collate_all_models (path, end_date = end_date)
75+
data$cm_metrics <- collate_all_metrics (path, end_date = end_date)
76+
data$cm_models <- collate_all_models (path, end_date = end_date)
7777

7878
return (data)
7979
}

codemeta.json

+5-12
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci-review-tools/repometrics",
99
"issueTracker": "https://github.com/ropensci-review-tools/repometrics/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.1.6.145",
11+
"version": "0.2.0",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",
@@ -331,18 +331,11 @@
331331
"name": "pkgstats",
332332
"sameAs": "https://github.com/ropensci-review-tools/pkgstats"
333333
},
334-
"SystemRequirements": {}
334+
"SystemRequirements": null
335335
},
336-
"fileSize": "24724.111KB",
336+
"fileSize": "24739.199KB",
337337
"readme": "https://github.com/ropensci-review-tools/repometrics/blob/main/README.md",
338-
"contIntegration": [
339-
"https://github.com/ropensci-review-tools/repometrics/actions?query=workflow%3AR-CMD-check",
340-
"https://app.codecov.io/gh/ropensci-review-tools/repometrics"
341-
],
338+
"contIntegration": ["https://github.com/ropensci-review-tools/repometrics/actions?query=workflow%3AR-CMD-check", "https://app.codecov.io/gh/ropensci-review-tools/repometrics"],
342339
"developmentStatus": "https://www.repostatus.org/#active",
343-
"keywords": [
344-
"dashboard",
345-
"r",
346-
"software-metrics"
347-
]
340+
"keywords": ["dashboard", "r", "software-metrics"]
348341
}

tests/testthat/test-data-rm.R

+13-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ test_that ("repometrics data full", {
1919
})
2020
names (data_ctbs) <- logins
2121

22+
cm_metrics <- collate_all_metrics (path, end_date = end_date)
23+
cm_models <- collate_all_models (path, end_date = end_date)
24+
2225
data <- repometrics_data (
2326
path,
2427
num_cores = 1L,
@@ -29,9 +32,17 @@ test_that ("repometrics data full", {
2932
fs::dir_delete (path)
3033

3134
expect_type (data, "list")
32-
expect_named (data, c ("pkgstats", "rm", "contributors"))
35+
expect_named (
36+
data,
37+
c ("pkgstats", "rm", "contributors", "cm_metrics", "cm_models")
38+
)
3339

34-
dat_constructed <- c (data_repo, contributors = list (data_ctbs))
40+
dat_constructed <- c (
41+
data_repo,
42+
contributors = list (data_ctbs),
43+
cm_metrics = list (cm_metrics),
44+
cm_models = list (cm_models)
45+
)
3546
expect_identical (data, dat_constructed)
3647
})
3748

0 commit comments

Comments
 (0)