Skip to content

Commit 40e12d7

Browse files
authored
align code with software review repo (#839)
1 parent 0ece97c commit 40e12d7

9 files changed

+151
-58
lines changed

preface.Rmd

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ This book is a living document.
2020
You can view updates to our best practices and policies via the [release notes](#booknews).
2121
You can cite this book using [its Zenodo metadata and DOI](https://doi.org/10.5281/zenodo.2553043).
2222

23-
```{r}
24-
#| echo: false
25-
#| results: 'asis'
26-
#| warning: false
27-
source(file.path("scripts", "airtable-get-reviewers.R"), local = knitr::knit_global())
28-
```
29-
3023
_If you want to contribute to this book (suggestions, corrections) please refer to [the GitHub repository](https://github.com/ropensci/dev_guide) in particular [the contributing guidelines](https://github.com/ropensci/dev_guide#contributing). Thanks!_
3124

3225
_We are thankful for all authors, reviewers and guest editors for helping us improve the system and this guide over the years. Thanks also to the following persons who made contributions to this guide and its previous incarnations: `r readLines("thanks.md")` Please tell us if we forgot to acknowledge your contribution!_

preface.es.Rmd

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ Este libro es un documento vivo.
2323
Puedes ver las actualizaciones de nuestras buenas prácticas y políticas a través de las [notas de cada versión](#booknews).
2424
Puedes citar este libro utilizando [sus metadatos de Zenodo y su DOI](https://doi.org/10.5281/zenodo.2553043).
2525

26-
```{r}
27-
#| echo: false
28-
#| results: 'asis'
29-
#| warning: false
30-
source(file.path("scripts", "airtable-get-reviewers.R"), local = knitr::knit_global())
31-
```
32-
3326
*Si quieres contribuir sugerencias o correcciones a este libro, visita [el repositorio de GitHub](https://github.com/ropensci/dev_guide) y, en particular, [la guía de contribución](https://github.com/ropensci/dev_guide#contributing). ¡Gracias!*
3427

3528
*Agradecemos a quienes crean, mantienen, revisan y editan paquetes por ayudarnos a mejorar el sistema y esta guía a lo largo de los años. Gracias también a las siguientes personas que han contribuido a esta guía y a sus versiones anteriores: `r readLines("thanks.md")`. Por favor, avísanos si nos olvidamos de reconocer tu contribución.*

scripts/airtable-get-data.R

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## setup ----
2+
3+
if (Sys.getenv("AIRTABLE_API_KEY") == ""){
4+
Sys.setenv(AIRTABLE_API_KEY = params$AIRTABLE_API_KEY)
5+
}
6+
if (Sys.getenv("AIRTABLE_ID") == ""){
7+
Sys.setenv(AIRTABLE_ID = params$AIRTABLE_ID)
8+
}
9+
10+
## all reviewers ----
11+
at_rev <- airtabler::airtable(base = Sys.getenv("AIRTABLE_ID"),
12+
table = "reviewers-prod")
13+
reviewers <- at_rev$`reviewers-prod`$select_all()
14+
15+
## eic ----
16+
17+
at_eic <- airtabler::airtable(base = Sys.getenv("AIRTABLE_ID"),
18+
table = "editor-in-chief-rotation")
19+
eic <- at_eic$`editor-in-chief-rotation`$select_all()
20+
21+
eic$period_start <- as.Date(eic$period_start)
22+
eic$period_end <- as.Date(eic$period_end)
23+
today <- Sys.Date ()
24+
eic_now <- eic [which (eic$period_start <= today & eic$period_end >= today), ]
25+
eic_name <- eic_now$acting_eic_name [[1]]
26+
eic_id <- eic_now$acting_eic
27+
eic_in_rev_table <- which(reviewers$id == eic_id)
28+
eic_github <- reviewers$github[eic_in_rev_table]
29+
30+
## guest editors ----
31+
32+
at_guest <- airtabler::airtable(base = "app8dssb6a7PG6Vwj",
33+
table = "guest-editors")
34+
35+
36+
editor_index_all <- purrr::map_lgl(reviewers$editor, ~!is.null(.))
37+
editors_all <- reviewers[which(editor_index_all), c("name", "github", "Affiliation", "editor")]
38+
editors_all <- editors_all [which(!editors_all$name == eic_name), ]
39+
last_names <- humaniformat::last_name(trimws(editors_all$name))
40+
editors_all <- editors_all[order(last_names), ]
41+
42+
editors_past <- editors_all[grep("Emeritus", editors_all$editor), ]
43+
editors <- editors_all[which(!editors_all$name %in% editors_past$name), ]
44+
45+
guest_editors <- at_guest$`guest-editors`$select_all()
46+
47+
guest_editors <- airtabler::airtable(base = "app8dssb6a7PG6Vwj",
48+
table = "guest-editors")
49+
guest_editors <- guest_editors$`guest-editors`$select_all(fields = list("name", "github"))
50+
guest_editors <- guest_editors[!(guest_editors$name %in% c(editors$name, "???")), ]
51+
last_names <- humaniformat::last_name(trimws(guest_editors$name))
52+
guest_editors <- guest_editors[order(last_names), ]
53+
54+
## reviewers that are not editors ----
55+
56+
reviewers <- reviewers[purrr::map_lgl(reviewers$reviews,
57+
~!is.null(.)) &
58+
!(reviewers$name %in% c(editors_all$name, "???")), ]
59+
last_names <- humaniformat::last_name(trimws(reviewers$name))
60+
reviewers <- reviewers[order(last_names), ]
61+
reviewers$name[is.na(reviewers$name)] <- reviewers$github[is.na(reviewers$name)]

scripts/airtable-get-editors.R

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
guest_editors <- airtabler::airtable(base = "app8dssb6a7PG6Vwj",
2-
table = "guest-editors")
3-
guest_editors <- guest_editors$`guest-editors`$select_all(fields = list("name", "github"))
4-
guest_editors <- guest_editors[!(guest_editors$name %in% c(editors, "???")), ]
5-
# get last names
6-
last_names <- humaniformat::last_name(trimws(guest_editors$name))
7-
guest_editors <- guest_editors[order(last_names), ]
8-
cat(paste0("[", guest_editors$name, "](https://github.com/", guest_editors$github, ")", collapse = " \U00B7 "))
1+
gen_ed_out <- function(ed_dat) {
2+
if (!"Affiliation" %in% names(ed_dat)) {
3+
ed_dat$Affiliation <- NA_character_
4+
}
5+
out <- gsub("(,\\sNA|\\s);", ";", paste0(
6+
"- [", ed_dat$name, "](https://github.com/", ed_dat$github, "), ",
7+
ed_dat$Affiliation, ";\n"))
8+
out[length(out)] <- gsub(";\\n$", ".\n", out[length(out)])
9+
return(out)
10+
}
11+
12+
cat(gen_ed_out(editors), sep = "")

scripts/airtable-get-eic.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
out <- paste0(
2+
"We rotate our Editor-in-Chief, generally every three months. ",
3+
"Our current Editor-in-Chief is [", eic_name, "](https://github.com/",
4+
eic_github, ").\n"
5+
)
6+
cat(out, sep = "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cat(paste0("[", guest_editors$name, "](https://github.com/", guest_editors$github, ")", collapse = " \U00B7 "))

scripts/airtable-get-reviewers.R

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
1-
reviewers <- airtabler::airtable(base = "app8dssb6a7PG6Vwj",
2-
table = "reviewers-prod")
3-
reviewers <- reviewers$`reviewers-prod`$select_all(fields = list("reviews", "editor", "name", "github"))
4-
editors <- reviewers[lengths(reviewers$editor) > 0,][["name"]]
5-
reviewers <- reviewers[purrr::map_lgl(reviewers$reviews,
6-
~!is.null(.)) &
7-
!(reviewers$name %in% c(editors, "???")), ]
8-
# get last names
9-
last_names <- humaniformat::last_name(trimws(reviewers$name))
10-
reviewers <- reviewers[order(last_names), ]
11-
reviewers$name[is.na(reviewers$name)] <- reviewers$github[is.na(reviewers$name)]
12-
cat(paste0("[", reviewers$name, "](https://github.com/", reviewers$github, ")", collapse = " \U00B7 "))
1+
cat(paste0("[", reviewers$name, "](https://github.com/", reviewers$github, ")", collapse = " \U00B7 "))

softwarereview_intro.Rmd

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,61 @@ Furthermore, authors and reviewers have the ability to contact privately the edi
4949

5050
## Editors and reviewers {#editors-and-reviewers}
5151

52-
### Associate editors {#associateditors}
5352

54-
rOpenSci's Software Peer Review process is run by:
53+
rOpenSci's Software Peer Review process is run by our team of dedicated editors and reviewers.
54+
Information on the current team, and the current status of software peer review, can be seen on our [interactive dashboard](https://ropensci-review-tools.github.io/dashboard/).
5555

5656
```{r}
57-
#| child: "associate-editors.md"
57+
#| echo: false
58+
#| results: 'asis'
59+
source(file.path("scripts", "airtable-get-data.R"), local = knitr::knit_global())
60+
5861
```
5962

60-
### Reviewers {#reviewers}
6163

62-
We are grateful to the following individuals who have offered up their time and expertise to review packages submitted to rOpenSci.
64+
### Editor-in-Chief
6365

6466
```{r}
6567
#| echo: false
66-
source(file.path("scripts", "airtable-access.R"), local = knitr::knit_global())
68+
#| results: 'asis'
69+
source(file.path("scripts", "airtable-get-eic.R"), local = knitr::knit_global())
70+
6771
```
6872

73+
74+
### Editorial team
75+
76+
77+
Our current team of editors for software peer-review includes:
78+
6979
```{r}
7080
#| echo: false
7181
#| results: 'asis'
72-
#| eval: !expr has_airtable_access()
73-
source(file.path("scripts", "airtable-get-reviewers.R"), local = knitr::knit_global())
82+
source(file.path("scripts", "airtable-get-editors.R"), local = knitr::knit_global())
83+
7484
```
7585

76-
We are also grateful to the following individuals who have served as guest editors.
86+
### Reviewers and former editors
87+
88+
We are grateful to the following individuals who have offered up their time and expertise to review packages submitted to rOpenSci.
7789

7890
```{r}
7991
#| echo: false
8092
#| results: 'asis'
81-
#| eval: !expr has_airtable_access()
82-
source(file.path("scripts", "airtable-get-editors.R"), local = knitr::knit_global())
93+
source(file.path("scripts", "airtable-get-reviewers.R"), local = knitr::knit_global())
94+
95+
```
96+
97+
We are also grateful to the following individuals who have previously served as editors.
98+
99+
```{r editors_past, echo=FALSE, results='asis'}
100+
cat(gen_ed_out(editors_past), sep = "")
101+
```
102+
103+
And the following who have served as guest editors.
83104

105+
```{r guest-editors-out, echo=FALSE, results='asis'}
106+
cat(gen_ed_out(guest_editors), sep = "")
84107
```
85108

86109

softwarereview_intro.es.Rmd

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,38 +67,61 @@ Además, tanto quienes envían paquete y quienes los revisan tienen la posibilid
6767

6868
## Personas responsables de edición y revisión {#editors-and-reviewers}
6969

70-
### Equipo editorial asociado {#associateditors}
71-
72-
El proceso de revisión por pares del software de rOpenSci está dirigido por
73-
7470
```{r}
75-
#| child: "associate-editors.md"
71+
#| echo: false
72+
#| results: 'asis'
73+
source(file.path("scripts", "airtable-get-data.R"), local = knitr::knit_global())
74+
7675
```
7776

78-
### Equipo de revisión {#reviewers}
7977

80-
Agradecemos a las siguientes personas que han ofrecido su tiempo y experiencia para revisar los paquetes enviados a rOpenSci:
78+
### Líder Editorial
8179

8280
```{r}
8381
#| echo: false
84-
source(file.path("scripts", "airtable-access.R"), local = knitr::knit_global())
82+
#| results: 'asis'
83+
out <- paste0(
84+
"Cambiamos lideres editoriales, aproximadamente cada 3 meses. ",
85+
"Hoy es [", eic_name, "](https://github.com/",
86+
eic_github, ").\n"
87+
)
88+
cat(out, sep = "")
89+
8590
```
8691

92+
93+
### Equipo editorial asociado
94+
95+
Nuestro equipo editorial asociado incluye:
96+
8797
```{r}
8898
#| echo: false
8999
#| results: 'asis'
90-
#| eval: !expr has_airtable_access()
91-
source(file.path("scripts", "airtable-get-reviewers.R"), local = knitr::knit_global())
100+
source(file.path("scripts", "airtable-get-editors.R"), local = knitr::knit_global())
101+
92102
```
93103

94-
También agradecemos a las siguientes personas que han tomado el rol de edición de forma invitada:
104+
105+
### Revisión y edición invitada
106+
107+
Agradecemos a las siguientes personas, quienes ofrecieron su tiempo y experiencia para revisar paquetes enviados a rOpenSci:
95108

96109
```{r}
97110
#| echo: false
98111
#| results: 'asis'
99-
#| eval: !expr has_airtable_access()
100-
source(file.path("scripts", "airtable-get-editors.R"), local = knitr::knit_global())
112+
source(file.path("scripts", "airtable-get-reviewers.R"), local = knitr::knit_global())
101113
102114
```
103115

116+
También agradecemos a las siguientes personas que tenian antes el rol de revisión.
104117

118+
```{r editors_past, echo=FALSE, results='asis'}
119+
cat(gen_ed_out(editors_past), sep = "")
120+
```
121+
122+
123+
También agradecemos a las siguientes personas que tomaron el rol de edición de forma invitada.
124+
125+
```{r guest-editors-out, echo=FALSE, results='asis'}
126+
cat(gen_ed_out(guest_editors), sep = "")
127+
```

0 commit comments

Comments
 (0)