NIEHS / beethoven

BEETHOVEN is: Building an Extensible, rEproducible, Test-driven, Harmonized, Open-source, Versioned, ENsemble model for air quality
https://niehs.github.io/beethoven/
Other
5 stars 0 forks source link

R CMD CHECK test #107

Closed kyle-messier closed 1 year ago

kyle-messier commented 1 year ago

@sigmafelix @MAKassien @MAKassien I accidentally closed the pull request related to this. We need to get an R CMD test. It currently brings out an error in the R-Markdowns.

MAKassien commented 1 year ago

I just found documentation about this issue happening to someone else here: https://github.com/rstudio/rmarkdown/issues/243

Their problem was that the vignette was built with output: rmarkdown::html_vignette and changing this solved the problem of it not passing the tests. We are also using that setting, so maybe we can implement a similar fix to what they do.

kyle-messier commented 1 year ago

@MAKassien Sounds like a promising lead. Worth a try

MAKassien commented 1 year ago

After looking into it further it seems like we have the correct settings in place already, so that is not the problem. @Spatiotemporal-Exposures-and-Toxicology you mentioned it may be because of the file's location in the new folder structure? I tried knitting the document in my local copy of the project repository and had no issues, so the file itself should have all the correct relative paths to work in any folder location within the NRT-AP-Project folder.

@sigmafelix you mentioned a different thing in the pull request yesterday about not having writing privileges, could that be the issue?

sigmafelix commented 1 year ago

@MAKassien I mentioned the writing privilege in the testing environment (where we do not have much control, as far as I understood the GitHub Actions for R packages) after looking at the generic error message of "cannot open the connection." This message is printed when the file is not present in the input path. Since the Rmd file is supposed to actually download and processes files, it would give errors if we cannot write files to the disk space in the testing environment. I guess the environment is fairly like a container, for which writing privilege is usually not given to users. Thus, I would suggest commenting out download.file and unzip part then see if it passes the test. We may try:

  1. As mentioned in the closed issue, we can fill "examples" part in the download function and remove the Rmd file.
  2. Run reprex on the entire R code in the Rmd file then paste it into the blank Rmd file. We will use the reprex markdown document as a vignette instead.
sigmafelix commented 1 year ago

I think we can close this issue as it was resolved.