bcgov / bcgovr

An R package to automate set up and sharing of R projects in bcgov GitHub following bcgov guidelines
Apache License 2.0
34 stars 5 forks source link

Warning message upon installation and package error message #41

Closed Janewyx closed 6 years ago

Janewyx commented 6 years ago

1) During the installation of the devel branch, there are several of the following warnings: RD warning: C:/Users/username/AppData/Local/Temp/RtmpELYh1H/remotes2d1428837be6/bcgov-bcgovr-5b3c598/man/use_bcgov_git.Rd:20: file link 'edit_r_profile' in package 'usethis' does not exist and so has been treated as a topic
use_bcgov_gitattributes html use_bcgov_github html At the end of installation after DONE (bcgovr) it says In R CMD INSTALL.

2) When using create_bcgov_package(), there is an error message that package roxygen2 is required. This package can be installed altogether with bcgovr so that the message does not appear later on?

boshek commented 6 years ago

@Janewyx Thanks for testing!

For 2, is it possible for you to run traceback() when create_bcgov_package() errors? I'm curious where the error happens.

ateucher commented 6 years ago

Hi @Janewyx!

These seem odd as I don't think devtools::install_github() builds documentation does it? Is that what you did Jane? Can you also post the output of your sessionInfo()?

stephhazlitt commented 6 years ago

I think the error comes from using remotes::install_github().

Janewyx commented 6 years ago

Hello Sam and Andy!

1) I used remotes::install_github("bcgov/bcgovr, ref = "devel"), as I was suggested to use devel branch. I didn't experience the warning in message if I just install without specifying the branch! session info: R version 3.5.0 (2018-04-23) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C [5] LC_TIME=English_Canada.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] bcgovr_0.1.7 loaded via a namespace (and not attached): [1] Rcpp_0.12.16 rstudioapi_0.7 whisker_0.3-2 magrittr_1.5 usethis_1.3.0 [6] xtable_1.8-2 R6_2.2.2 httr_1.3.1 tools_3.5.0 miniUI_0.1.1 [11] htmltools_0.3.6 remotes_1.1.1 yaml_2.1.19 digest_0.6.15 rprojroot_1.3-2 [16] assertthat_0.2.0 crayon_1.3.4 shiny_1.0.5 later_0.7.2 promises_1.0.1 [21] clisymbols_1.2.0 mime_0.5 gh_1.0.1 compiler_3.5.0 desc_1.2.0 [26] backports_1.1.2 jsonlite_1.5 httpuv_1.4.3

2) Here is what the traceback() returned: 4: stop("Package ", value(pkg), " required. Please install before re-trying", call. = FALSE) 3: check_installed("roxygen2") 2: usethis::use_roxygen_md() 1: create_bcgov_package()

ateucher commented 6 years ago

Ok, I think I was barking up the wrong tree there.

For number 2, we should clearly put roxygen2 in Suggests:, but I'm not sure it should be in Imports: (i.e., force installation on installing bcgovr) - I think the majority of users won't need it because they won't be developing packages, and those that do can (and should) install it on their own. So I think I'm ok with that error, as it is informative.

For number 1, I found this: https://stackoverflow.com/questions/48430093/how-do-i-resolve-rd-warning-missing-file-link-when-building-packages-in-rstudi

usethis::edit_r_profile() is actually documented in edit.Rd. Roxygen automatically expands [usethis::edit_r_profile()] to \link[usethis:edit_r_rprofile]{usethis::edit_r_profile()}, but it needs to be
\link[usethis:edit]{usethis::edit_r_profile()}.

ateucher commented 6 years ago

@Janewyx can you try installing again (at your convenience)? The install warning should go away 🤞, though you will still get the roxygen2 install error with create_bcgov_package() (that is of course if you haven't installed roxygen2 in the meantime).

Janewyx commented 6 years ago

I think it's good now!

* installing *source* package 'bcgovr' ...
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'bcgovr'
    finding HTML links ... done
    bcgovr-package                          html  
    create_bcgov_package                    html  
    create_bcgov_project                    html  
    create_from_bcgov_github                html  
    devex_badge                             html  
    insert_bcgov_apache_header              html  
    insert_bcgov_cc_header                  html  
    insert_bcgov_devex_badge                html  
    use_bcgov_code_of_conduct               html  
    use_bcgov_contributing                  html  
    use_bcgov_git                           html  
    use_bcgov_gitattributes                 html  
    use_bcgov_github                        html  
    use_bcgov_licence                       html  
    use_bcgov_readme                        html  
    use_bcgov_readme_rmd                    html  
    use_bcgov_req                           html  
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (bcgovr)
In R CMD INSTALL
stephhazlitt commented 6 years ago

Thanks again for test driving @Janewyx!