adw96 / DivNet

diversity estimation under ecological networks
83 stars 18 forks source link

problems with beta_diversity.Rmd #88

Closed adw96 closed 2 years ago

adw96 commented 3 years ago

I am marking this is urgent because our users all download the package from the master branch, which is currently failing checks.

Hi @ailurophilia - I downloaded the latest version of the package in order to review the new vignettes, and the package is no longer passing devtools::check(). I will be able to review the new content when this is remedied.

An immediate issue that appears is that testBetaDiversity() is not in the NAMESPACE, so potentially devtools::document() was not run.

A few other issues I see:

Also, we should never have commits directly to the master branch -- everything should be run on a testing branch first.

Also, how is it that we have CRAN checks passing but devtools::check() failing? (@paulinetrinh - do you know? How can we make our checks include vignettes building?)

ailurophilia commented 3 years ago

I did run devtools::document – looks like I forgot to add NAMESPACE to git tracked files, so I've just done that. Following up on the remainder of the issues as we speak.

adw96 commented 3 years ago

Wonderful, thank you!

paulinetrinh commented 3 years ago

On my TODO: I'll look into getting CRAN checks to track vignette building!

ailurophilia commented 3 years ago

Update:

adw96 commented 3 years ago

Woohoo, thanks @ailurophilia. I appreciate you looking into this very much. Are the vignettes ready for review, and if so, can I get them from master? Thanks!

ailurophilia commented 3 years ago

Yes, and yes :)

adw96 commented 3 years ago

I'm looking this over and there's still multiple Lee_phylum@sam_data's in there -- please proofread and revise again @ailurophilia

I also am having trouble knitting the beta_diversity vignette -- same as Pauline and Sarah.

Even if you can't recreate the issue in your developer folder @ailurophilia , could you please clone the repo into a new folder, open it as an R project, and confirm that you can

  1. devtools::build()
  2. devtools::check()
  3. knit beta_diversity.Rmd

and report back on the result.

ailurophilia commented 3 years ago

I apologize for the oversight regarding the additional uses of the @ operator. I've pushed a version with those removed to the testing branch and started a pull request.

I continue to be able to, after cloning the repo into a new folder and opening it as an R project, run devtools::build(), devtools::check(), and knit the vignette (devtools::build() and devtools::check() output reproduced below). It does take a moment to create the vignettes, so I've reduced the number of bootstrap samples the example analyses use in case this is causing an issue on other devices.

Here is the devtools::build() and devtools::check() output in a new repo opened as an R project:

library(devtools)
Loading required package: usethis
> devtools::build()
✓  checking for file ‘/Users/davidclausen/Documents/Projects/clean_divnet/DivNet/DESCRIPTION’ ...
─  preparing ‘DivNet’:
✓  checking DESCRIPTION meta-information ...
─  installing the package to build vignettes
✓  creating vignettes (2m 14.3s)
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘DivNet_0.4.0.tar.gz’

[1] "/Users/davidclausen/Documents/Projects/clean_divnet/DivNet_0.4.0.tar.gz"
> devtools::check()
ℹ Updating DivNet documentation
ℹ Loading DivNet
Loading required package: phyloseq
Loading required package: breakaway
Writing NAMESPACE
Writing NAMESPACE
── Building ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── DivNet ──
Setting env vars:
• CFLAGS    : -Wall -pedantic -fdiagnostics-color=always
• CXXFLAGS  : -Wall -pedantic -fdiagnostics-color=always
• CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✓  checking for file ‘/Users/davidclausen/Documents/Projects/clean_divnet/DivNet/DESCRIPTION’ ...
─  preparing ‘DivNet’:
✓  checking DESCRIPTION meta-information ...
─  installing the package to build vignettes
✓  creating vignettes (2m 5.7s)
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘DivNet_0.4.0.tar.gz’

── Checking ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── DivNet ──
Setting env vars:
• _R_CHECK_CRAN_INCOMING_REMOTE_: FALSE
• _R_CHECK_CRAN_INCOMING_       : FALSE
• _R_CHECK_FORCE_SUGGESTS_      : FALSE
• NOT_CRAN                      : true
── R CMD check ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─  using log directory ‘/private/var/folders/y0/4qkx8t615sd5r69bpryczmy40000gn/T/RtmpJdWJWk/DivNet.Rcheck’
─  using R version 4.0.4 (2021-02-15)
─  using platform: x86_64-apple-darwin17.0 (64-bit)
─  using session charset: UTF-8
─  using options ‘--no-manual --as-cran’
✓  checking for file ‘DivNet/DESCRIPTION’
─  checking extension type ... Package
─  this is package ‘DivNet’ version ‘0.4.0’
─  package encoding: UTF-8
✓  checking package namespace information ...
N  checking package dependencies (14.5s)
   Packages suggested but not available for checking:
     'glasso', 'huge', 'PDSCE', 'pulsar', 'SpiecEasi'
✓  checking if this is a source package
✓  checking if there is a namespace
✓  checking for executable files (516ms)
✓  checking for hidden files and directories
✓  checking for portable file names
✓  checking for sufficient/correct file permissions
✓  checking whether package ‘DivNet’ can be installed (16s)
✓  checking installed package size ...
✓  checking package directory ...
✓  checking for future file timestamps (1.9s)
✓  checking ‘build’ directory
✓  checking DESCRIPTION meta-information ...
N  checking top-level files
   Non-standard files/directories found at top level:
     ‘divnet-build-and-test.R’ ‘docs’
✓  checking for left-over files
✓  checking index information ...
✓  checking package subdirectories ...
✓  checking R files for non-ASCII characters ...
✓  checking R files for syntax errors ...
✓  checking whether the package can be loaded (4.7s)
✓  checking whether the package can be loaded with stated dependencies (4.5s)
✓  checking whether the package can be unloaded cleanly (4.3s)
✓  checking whether the namespace can be loaded with stated dependencies (3.8s)
✓  checking whether the namespace can be unloaded cleanly (3.9s)
✓  checking dependencies in R code (4.4s)
✓  checking S3 generic/method consistency (5.3s)
✓  checking replacement functions (4.4s)
✓  checking foreign function calls (5.1s)
✓  checking R code for possible problems (16.3s)
✓  checking Rd files ...
✓  checking Rd metadata ...
✓  checking Rd line widths ...
✓  checking Rd cross-references ...
✓  checking for missing documentation entries (4.7s)
✓  checking for code/documentation mismatches (12.6s)
✓  checking Rd \usage sections (5.3s)
✓  checking Rd contents ...
✓  checking for unstated dependencies in examples ...
✓  checking contents of ‘data’ directory ...
✓  checking data for non-ASCII characters (4.4s)
✓  checking data for ASCII and uncompressed saves ...
✓  checking installed files from ‘inst/doc’ ...
✓  checking files in ‘vignettes’ ...
─  checking examples ... NONE
✓  checking for unstated dependencies in ‘tests’ ...
─  checking tests ...
✓  Running ‘testthat.R’ [37s/38s] (37.5s)
✓  checking for unstated dependencies in vignettes (37.8s)
✓  checking package vignettes in ‘inst/doc’ ...
✓  checking re-building of vignette outputs (2m 7.8s)
✓  checking for non-standard things in the check directory
✓  checking for detritus in the temp directory

   See
     ‘/private/var/folders/y0/4qkx8t615sd5r69bpryczmy40000gn/T/RtmpJdWJWk/DivNet.Rcheck/00check.log’
   for details.

── R CMD check results ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── DivNet 0.4.0 ────
Duration: 4m 45.6s

> checking package dependencies ... NOTE
  Packages suggested but not available for checking:
    'glasso', 'huge', 'PDSCE', 'pulsar', 'SpiecEasi'

> checking top-level files ... NOTE
  Non-standard files/directories found at top level:
    ‘divnet-build-and-test.R’ ‘docs’

0 errors ✓ | 0 warnings ✓ | 2 notes x
ailurophilia commented 3 years ago

What happens when you try to build the vignette?

adw96 commented 3 years ago

Ooooo it's now building for me! Previously I was getting issues with testBetaDiversity() not found. @paulinetrinh is it building for you?

paulinetrinh commented 3 years ago

YES! It's building now!! and @svteichman has hers working now too after uninstalling then reinstalling DivNet! yayyyy

paulinetrinh commented 2 years ago

I tried various changes to the vignette to see if devtools::check() and R-CMD-Check would pass with functions that don't exist/incorrect data/things that should throw errors in the vignettes and R-CMD-Check did catch those things and failed properly. I'm not sure what happened with why R-CMD-Check didn't catch the errors with beta_diversity.Rmd from the previous version but it appears to be working as expected currently!