Skip to content

Commit b180769

Browse files
committed
small update to check template
1 parent 4b3999a commit b180769

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

R/codecheck.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ as_latex_url <- function(x) {
189189
##' @export
190190
latex_summary_of_metadata <- function(metadata) {
191191
summary_entries = list(
192-
"Title" = metadata$paper$title,
193-
"Authors" = .names(metadata$paper$authors),
194-
"Reference" = as_latex_url(metadata$paper$reference),
195-
"Codechecker" = .names(metadata$codechecker),
192+
"Title of checked publication" = metadata$paper$title,
193+
"Author(s)" = .names(metadata$paper$authors),
194+
"Reference" = as_latex_url(metadata$paper$reference),
195+
"Codechecker(s)" = .names(metadata$codechecker),
196196
"Date of check" = metadata$check_time,
197197
"Summary" = metadata$summary,
198198
"Repository" = as_latex_url(metadata$repository))

R/utils_render_cert_md.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ get_abstract_text_crossref <- function(register_repo) {
170170

171171
# Could not retrieve data for DOI
172172
else {
173-
warning(paste("Failed to retrieve data for DOI", doi))
173+
warning(paste("Failed to retrieve abstract text for DOI", doi))
174174
return(NULL)
175175
}
176176
}

inst/extdata/templates/codecheck/codecheck.Rmd

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,30 @@ require("xtable")
1616
require("tibble")
1717
require("readr")
1818
options(width = 60)
19-
opts_chunk$set(cache=FALSE)
19+
opts_chunk$set(cache = FALSE)
2020
21-
root = find_root("codecheck.yml")
21+
root <- find_root("codecheck.yml")
2222
```
2323

2424
```{r codecheck_logo, echo=FALSE,results='asis'}
2525
latex_codecheck_logo()
2626
```
2727

2828
```{r manifest, eval=TRUE, include=FALSE}
29-
metadata = codecheck_metadata(root)
30-
manifest = metadata$manifest
29+
metadata <- codecheck_metadata(root)
30+
manifest <- metadata$manifest
3131
32-
dest_dir = file.path(root, "codecheck", "outputs")
32+
dest_dir <- file.path(root, "codecheck", "outputs")
3333
## Create the outputs directory if missing
34-
if ( !dir.exists(dest_dir) ) {
34+
if (!dir.exists(dest_dir) ) {
3535
dir.create(dest_dir)
3636
}
3737
38-
manifest_df = copy_manifest_files(root, metadata,
38+
manifest_df <- copy_manifest_files(root, metadata,
3939
dest_dir, keep_full_path = FALSE,
4040
overwrite = FALSE
4141
)
42+
# manifest_df <- list_manifest_files(root, metadata, dest_dir)
4243
```
4344

4445
---
@@ -92,16 +93,16 @@ I suggest to the authors to consider the following suggestions for their next pu
9293
# Manifest files
9394

9495
```{r, echo=FALSE, results="asis", width=100}
95-
for(i in c(1:nrow(manifest_df))) {
96-
path <- manifest_df[i,"dest"]
96+
for (i in c(1:nrow(manifest_df))) {
97+
path <- manifest_df[i, "dest"]
9798
if(stringr::str_ends(path, "(png|pdf|jpg|jpeg)")) {
9899
# include graphics with knitr has to happen at top level in chunks, see https://github.com/yihui/knitr/issues/1260
99100
# see also https://stackoverflow.com/questions/51268623/insert-images-using-knitrinclude-graphics-in-a-for-loop
100101
# knitr::include_graphics(manifest_df[1, "dest"], error = TRUE)
101102
# Therefore, generate Markdown code here:
102103
cat("## ", basename(path), "\n\n")
103104
cat("**Comment:** ", manifest_df[i,"comment"], "\n\n")
104-
cat(paste0("![", "Test ", "](", path, ")\n"))
105+
cat(paste0("![", manifest_df[i,"comment"], "](", path, ")\n"))
105106
} else if (stringr::str_ends(path, "(Rout|txt)")) {
106107
cat("## ", basename(path), "\n\n")
107108
cat("\\scriptsize \n\n", "```txt\n")

vignettes/codecheck_overview.Rmd

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,24 @@ create_codecheck_files()
5151
These create several files that need to be edited for the codecheck
5252
process:
5353

54-
1. *codecheck.yml* contains the metadata for the reproduction. If
54+
1. `codecheck.yml` contains the metadata for the reproduction. If
5555
the author or someone else has already created it, double-check
5656
if all required information is provided - see the
5757
[specification](https://codecheck.org.uk/spec/config/latest/).
58-
2. *codecheck/codecheck.Rmd* is a suggested R Markdown script to
59-
edit, along with *Makefile* and *codecheck-preamble.sty* to help
58+
2. `codecheck/codecheck.Rmd` is a suggested R Markdown script to
59+
edit, along with `Makefile` and `codecheck-preamble.sty` to help
6060
compile the PDF.
61-
3. *codecheck/zenodo-codecheck.R* for help in loading the certificate
61+
3. `codecheck/zenodo-codecheck.R` for help in loading the certificate
6262
to Zenodo along with the corresponding metadata.
63+
4. `CODECHECK_report_template.odt` and `.docx` are templates for usage with
64+
common word processors - please delete if you use the `.Rmd` file.
6365

64-
There is also a Makefile so that `make` within the codecheck folder
66+
There is also a Makefile so that `make` within the `codecheck/` folder
6567
will rebuild `codecheck.pdf`.
6668

6769
## Completing the metadata file *codecheck.yml*
6870

69-
The *codecheck.yml* file contains all the relevant metadata for the
71+
The `codecheck.yml` file contains all the relevant metadata for the
7072
certificate. Simply edit it to your needs, bearing in mind the
7173
specification comments at <https://codecheck.org.uk/spec/config/latest>.
7274

0 commit comments

Comments
 (0)