Skip to content

Commit 790967c

Browse files
committed
add text to network page for #59
1 parent ab48e65 commit 790967c

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
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.3.058
3+
Version: 0.1.3.059
44
Authors@R:
55
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

R/quarto-dashboard.R

+10
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,16 @@ quarto_insert_pkg_name <- function (dir, pkg_name) {
202202
i <- grep ("^(\\s+?)title", y)
203203
y [i] <- gsub ("Package", pkg_name, y [i])
204204
brio::write_lines (y, f_yaml)
205+
206+
f_network <- fs::path (dir, "network.qmd")
207+
network_qmd <- brio::read_lines (f_network)
208+
network_qmd <- gsub (
209+
"the XXX repository",
210+
paste0 ("the `", pkg_name, "` repository"),
211+
network_qmd,
212+
fixed = TRUE
213+
)
214+
brio::write_lines (network_qmd, f_network)
205215
}
206216

207217
check_dashboard_arg <- function (data) {

codemeta.json

+1-1
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.3.058",
11+
"version": "0.1.3.059",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",

inst/extdata/quarto/network.qmd

+13
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ nodes_user <- data.frame (id = dat_pkg$rm$contribs_from_gh_api$login, group = 4L
3232
nodes_user$group [which (nodes_user$id %in% names (dat_users))] <- 3L
3333
```
3434

35+
This page shows an interactive network diagram of the main developers of
36+
the XXX repository, including all other repositories they have contributed to.
37+
Links are shown between developers and repositories, as well as between
38+
developers themselves. Thickness of lines connecting developers are scaled
39+
according to relative efforts in joint repositories.
40+
41+
The "person" nodes show main developers of the XXX repository, which is shown
42+
in the centre of the graph as "this_repo". The lines connecting "this_repo"
43+
with developers are scaled according to proportional contributions to other
44+
repositories on which they have worked (over the default time-span of the
45+
previous year), with circles for those repositories scaled by total numbers of
46+
commits made by the core developer team of the XXX repository.
47+
3548
```{ojs import-network-data}
3649
network = FileAttachment("results-user-network.json").json()
3750
```

0 commit comments

Comments
 (0)