RajLabMSSM / echogithub

echoverse module: Extract data and metadata from GitHub
0 stars 0 forks source link

`Root criterion: contains a file "DESCRIPTION" with contents matching "^Package: "` #1

Open bschilder opened 2 years ago

bschilder commented 2 years ago

This error only seems to occur in the examples during Rstudio checks. I can't even replicate it with: devtools::run_examples() in the Rstudio console:

    h <- readme_header(owner = "RajLabMSSM",
                       repo = "echolocatoR")
  Error: No root directory found in /Users/schilder/Desktop/echoverse/echogithub.Rcheck or its parent directories. Root criterion: contains a file "DESCRIPTION" with contents matching "^Package: "

Seems like it might be related to the checks having a different dir structure, but can't figure it out.

Related issue: https://github.com/r-lib/here/issues/49

rprojroot might help somehow: https://cran.r-project.org/web/packages/rprojroot/vignettes/rprojroot.html

Session info

``` R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.4 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] echogithub_0.99.0 testthat_3.1.5 dplyr_1.0.10 loaded via a namespace (and not attached): [1] Rcpp_1.0.9 prettyunits_1.1.1 ps_1.7.2 assertthat_0.2.1 rprojroot_2.0.3 [6] digest_0.6.30 utf8_1.2.2 mime_0.12 R6_2.5.1 httr_1.4.4 [11] ggplot2_3.4.0 pillar_1.8.1 yulab.utils_0.0.5 rlang_1.0.6 rstudioapi_0.14 [16] data.table_1.14.4 miniUI_0.1.1.1 urlchecker_1.0.1 callr_3.7.3 devtools_2.4.5 [21] stringr_1.4.1 htmlwidgets_1.5.4 dlstats_0.1.5 RCurl_1.98-1.9 munsell_0.5.0 [26] shiny_1.7.3 compiler_4.2.1 httpuv_1.6.6 pkgconfig_2.0.3 pkgbuild_1.3.1 [31] htmltools_0.5.3 tidyselect_1.2.0 tibble_3.1.8 fansi_1.0.3 crayon_1.5.2 [36] later_1.3.0 bitops_1.0-7 brio_1.1.3 grid_4.2.1 jsonlite_1.8.3 [41] xtable_1.8-4 gtable_0.3.1 lifecycle_1.0.3 DBI_1.1.3 magrittr_2.0.3 [46] scales_1.2.1 cli_3.4.1 stringi_1.7.8 cachem_1.0.6 fs_1.5.2 [51] promises_1.2.0.1 remotes_2.4.2 ellipsis_0.3.2 rvcheck_0.2.1 generics_0.1.3 [56] vctrs_0.5.0 gh_1.3.1 RColorBrewer_1.1-3 tools_4.2.1 glue_1.6.2 [61] purrr_0.3.5 processx_3.8.0 pkgload_1.3.1 parallel_4.2.1 fastmap_1.1.0 [66] colorspace_2.0-3 BiocManager_1.30.19 sessioninfo_1.2.2 memoise_2.0.1 badger_0.2.2 [71] usethis_2.1.6 profvis_0.3.7 ```
bschilder commented 2 years ago

Supplying ref and pkg args to the badger functions did seem to help either. Neither did turning off: add_hex or add_version. Which is really weird, be the error occurs right after the message for "Adding version."

bschilder commented 2 years ago

Might be related to utils::packageDescription, as I'm having similar issues in echodeps::package_metadata, which uses that same function and was working fine until recently.