new_compendium fails when using 'given' arg rather than set credentials
Closed this issue · 2 comments
Hi,
Thanks for the package, looks great!
I'm having problems trying the new_compendium
function without having set credentials before (i.e. using the arguments given, family, and email within new_compendium
)
library(rcompendium)
new_compendium(given = 'John', family = "Doe", email = "john.doe@domain.com")
#> ✓ Setting active project to '/tmp/RtmpaC0pwr/reprex-16d6647a7a344-girly-unau'
#>
#> ◉ Initializing Versioning
#>
#> ✓ Init 'git' versioning
#> ✓ Writing '.gitignore' file
#>
#> ◉ Creating Package Structure
#>
#> ✓ Writing '.Rbuildignore' file
#> ✓ Adding '^reprex-16d6647a7a344-girly-unau\\.Rproj$' to '.Rbuildignore'
#> ✓ Adding '^\\.Rproj\\.user$' to '.Rbuildignore'
#> ✓ Adding '^\\.DS_Store$' to '.Rbuildignore'
#>
#> ✓ Writing 'DESCRIPTION' file
#>
#> ✓ Setting License field in DESCRIPTION to 'GPL (>= 2)'
#> ✓ Writing 'LICENSE.md' file
#> ✓ Adding '^LICENSE\\.md$' to '.Rbuildignore'
#>
#> ✓ Creating 'R/' directory
#> ✓ Creating 'man/' directory
#>
#> ✓ Writing 'R/reprex-16d6647a7a344-girly-unau-package.R' file
#> ✓ Writing 'inst/CITATION' file
#>
#> ✓ Writing 'R/fun-demo.R' file
#>
#> ◉ Creating Compendium Folders
#>
#> ✓ Creating 'data/' directory
#> ✓ Adding '^data$' to '.Rbuildignore'
#>
#> ✓ Creating 'outputs/' directory
#> ✓ Adding '^outputs$' to '.Rbuildignore'
#>
#> ✓ Creating 'figures/' directory
#> ✓ Adding '^figures$' to '.Rbuildignore'
#>
#> ✓ Creating 'rscripts/' directory
#> ✓ Adding '^rscripts$' to '.Rbuildignore'
#>
#> ✓ Creating 'paper/' directory
#> ✓ Adding '^paper$' to '.Rbuildignore'
#>
#> Error in stop_if_not_string(given, family, email): Argument 'given' must be a character of length 1.
Created on 2021-06-16 by the reprex package (v2.0.0)
The traceback indicates that the problem arises when calling add_makefile
without providing the given, family, and email arguments:
4: stop("Argument '", names(is_string[is_string != 1])[1], "' must be a character of length 1.")
3: stop_if_not_string(given, family, email)
2: add_makefile(open = FALSE, overwrite = overwrite, quiet = quiet)
1: new_compendium(given = 'John', family = "Doe", email = "john.doe@domain.com")
Hence, if I'm correct it seems that we could fix it by providing those arguments (given, family, email) when calling add_makefile
here, no?
Hope this helps. Thanks!
Hi Francisco,
Thanks for identifying this bug. I added your suggestion in new_compendium()
:
add_makefile(**given**, **family**, **email**, open = FALSE, overwrite = overwrite, quiet = quiet)
You can test the function new_compendium()
by using the new development version of rcompendium
from GitHub:
remotes::install_github("FRBCesab/rcompendium")
Can you confirm me that fix the error?
Cheers,
Nicolas.
Hi Nicolas,
Thanks for the quick fix!
I'm having another issue now with website creation, but will open in separate issue
Thanks