FertigLab / CoGAPS

Bayesian MCMC matrix factorization algorithm
https://www.bioconductor.org/packages/release/bioc/html/CoGAPS.html
BSD 3-Clause "New" or "Revised" License
61 stars 17 forks source link

Eliminate warnings during build #75

Closed dimalvovs closed 10 months ago

dimalvovs commented 11 months ago

Although build errors have been fixed, there are multiple warnings generated during the build process.

Screenshot 2023-09-25 at 21 13 28
dimalvovs commented 11 months ago

Build passed on Win and Mac OS, vignette created.

u88@clarity-3 CoGAPS % R CMD build .
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘CoGAPS’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* running ‘cleanup’
* installing the package to build vignettes
* creating vignettes ... OK
* cleaning src
* running ‘cleanup’
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘CoGAPS_3.21.2.tar.gz’
C:\Users\lvovs\Documents\CoGAPS>R CMD build .
* checking for file './DESCRIPTION' ... OK
* preparing 'CoGAPS':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
* creating vignettes ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'CoGAPS_3.21.2.tar.gz'
dimalvovs commented 11 months ago

Check ok on MacOS (2 warnings remain) and on Win platforms (3 warnings)

Mac:

u88@clarity-3 CoGAPS % R CMD check CoGAPS_3.21.2.tar.gz 
* using log directory ‘/Users/u88/Documents/jhu/cogaps/CoGAPS/CoGAPS.Rcheck’
* using R version 4.3.1 (2023-06-16)
* using platform: x86_64-apple-darwin20 (64-bit)
* R was compiled by
    Apple clang version 14.0.3 (clang-1403.0.22.14.1)
    GNU Fortran (GCC) 12.2.0
* running under: macOS Monterey 12.6.6
* using session charset: UTF-8
* checking for file ‘CoGAPS/DESCRIPTION’ ... OK
* this is package ‘CoGAPS’ version ‘3.21.2’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘CoGAPS’ can be installed ... WARNING
Found the following significant warnings:
  GapsRunner.cpp:430:13: warning: enumeration value 'GAPS_ALL_PHASES' not handled in switch [-Wswitch]
See ‘/Users/u88/Documents/jhu/cogaps/CoGAPS/CoGAPS.Rcheck/00install.out’ for details.
* used C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
* used SDK: ‘MacOSX13.1.sdk’
* checking installed package size ... NOTE
  installed size is 22.4Mb
  sub-directories of 1Mb or more:
    extdata  19.9Mb
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
plot.CogapsResult: no visible global function definition for ‘axis’
plot.CogapsResult: no visible global function definition for ‘text’
plot.CogapsResult: no visible global function definition for ‘par’
MANOVA,matrix-CogapsResult: no visible global function definition for
  ‘manova’
fromCSV,character: no visible global function definition for ‘read.csv’
getPatternHallmarks,CogapsResult: no visible binding for global
  variable ‘.’
getPatternHallmarks,CogapsResult: no visible binding for global
  variable ‘MsigDB_Hallmark’
getPatternHallmarks,CogapsResult: no visible binding for global
  variable ‘padj’
plotPatternHallmarks,CogapsResult-list-numeric: no visible binding for
  global variable ‘overlapGenes’
plotPatternHallmarks,CogapsResult-list-numeric: no visible binding for
  global variable ‘padj’
show,CogapsParams: no visible binding for global variable
  ‘checkpointFile’
toCSV,CogapsResult-character: no visible global function definition for
  ‘write.csv’
Undefined global functions or variables:
  . MsigDB_Hallmark axis checkpointFile manova overlapGenes padj par
  read.csv text write.csv
Consider adding
  importFrom("graphics", "axis", "par", "text")
  importFrom("stats", "manova")
  importFrom("utils", "read.csv", "write.csv")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... WARNING
Undocumented arguments in documentation object 'CoGAPS'
  ‘useCheckPoint’ ‘checkpointFile’
Documented arguments not in \usage in documentation object 'CoGAPS':
  ‘checkpointInFile’

Undocumented arguments in documentation object 'GWCoGAPS'
  ‘checkpointFile’

Undocumented arguments in documentation object 'scCoGAPS'
  ‘checkpointFile’

Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in shell scripts ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... NOTE
File ‘CoGAPS/libs/CoGAPS.so’:
  Found ‘__ZNSt3__14coutE’, possibly from ‘std::cout’ (C++)
    Objects: ‘GapsResult.o’, ‘GapsRunner.o’,
      ‘file_parser/CharacterDelimitedParser.o’,
      ‘file_parser/FileParser.o’, ‘file_parser/MtxParser.o’
  Found ‘___stdoutp’, possibly from ‘stdout’ (C)
    Object: ‘GapsRunner.o’
  Found ‘_printf’, possibly from ‘printf’ (C)
    Objects: ‘GapsParameters.o’, ‘GapsRunner.o’,
      ‘file_parser/MatrixElement.o’
  Found ‘_putchar’, possibly from ‘putchar’ (C)
    Object: ‘GapsParameters.o’
  Found ‘_puts’, possibly from ‘printf’ (C), ‘puts’ (C)
    Objects: ‘GapsParameters.o’, ‘GapsRunner.o’

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs nor [v]sprintf.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ...
  ‘CoGAPS.Rmd’ using ‘UTF-8’... OK
 NONE
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

Status: 2 WARNINGs, 3 NOTEs
See
  ‘/Users/u88/Documents/jhu/cogaps/CoGAPS/CoGAPS.Rcheck/00check.log’
for details.

Win:

C:\Users\lvovs\Documents\CoGAPS>R CMD check CoGAPS_3.21.2.tar.gz
* using log directory 'C:/Users/lvovs/Documents/CoGAPS/CoGAPS.Rcheck'
* using R version 4.3.1 (2023-06-16 ucrt)
* using platform: x86_64-w64-mingw32 (64-bit)
* R was compiled by
    gcc.exe (GCC) 12.2.0
    GNU Fortran (GCC) 12.2.0
* running under: Windows Server 2022 x64 (build 20348)
* using session charset: UTF-8
* checking for file 'CoGAPS/DESCRIPTION' ... OK
* this is package 'CoGAPS' version '3.21.2'
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'CoGAPS' can be installed ... WARNING
Found the following significant warnings:
  GapsParameters.cpp:41:46: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'std::vector<unsigned int>::size_type' {aka 'long long unsigned int'} [-Wformat=]
  GapsRunner.cpp:430:5: warning: enumeration value 'GAPS_ALL_PHASES' not handled in switch [-Wswitch]
See 'C:/Users/lvovs/Documents/CoGAPS/CoGAPS.Rcheck/00install.out' for details.
* used C++ compiler: 'G__~1.EXE (GCC) 12.2.0'
* checking installed package size ... NOTE
  installed size is 22.8Mb
  sub-directories of 1Mb or more:
    extdata  19.9Mb
    libs      1.4Mb
* checking package directory ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
plot.CogapsResult: no visible global function definition for 'axis'
plot.CogapsResult: no visible global function definition for 'text'
plot.CogapsResult: no visible global function definition for 'par'
MANOVA,matrix-CogapsResult: no visible global function definition for
  'manova'
fromCSV,character: no visible global function definition for 'read.csv'
getPatternHallmarks,CogapsResult: no visible binding for global
  variable '.'
getPatternHallmarks,CogapsResult: no visible binding for global
  variable 'MsigDB_Hallmark'
getPatternHallmarks,CogapsResult: no visible binding for global
  variable 'padj'
plotPatternHallmarks,CogapsResult-list-numeric: no visible binding for
  global variable 'overlapGenes'
plotPatternHallmarks,CogapsResult-list-numeric: no visible binding for
  global variable 'padj'
show,CogapsParams: no visible binding for global variable
  'checkpointFile'
toCSV,CogapsResult-character: no visible global function definition for
  'write.csv'
Undefined global functions or variables:
  . MsigDB_Hallmark axis checkpointFile manova overlapGenes padj par
  read.csv text write.csv
Consider adding
  importFrom("graphics", "axis", "par", "text")
  importFrom("stats", "manova")
  importFrom("utils", "read.csv", "write.csv")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... WARNING
Undocumented arguments in documentation object 'CoGAPS'
  'useCheckPoint' 'checkpointFile'
Documented arguments not in \usage in documentation object 'CoGAPS':
  'checkpointInFile'

Undocumented arguments in documentation object 'GWCoGAPS'
  'checkpointFile'

Undocumented arguments in documentation object 'scCoGAPS'
  'checkpointFile'

Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter 'Writing R documentation files' in the 'Writing R
Extensions' manual.
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in shell scripts ... WARNING
Found the following shell script(s) with CR or CRLF line endings:
  configure.ac
Non-Windows OSes require LF line endings.
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... NOTE
File 'CoGAPS/libs/x64/CoGAPS.dll':
  Found '_ZSt4cout', possibly from 'std::cout' (C++)
    Objects: 'GapsResult.o', 'GapsRunner.o',
      'file_parser/CharacterDelimitedParser.o',
      'file_parser/FileParser.o', 'file_parser/MtxParser.o'

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs nor [v]sprintf.

See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ... OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
  Running 'testthat.R'
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking running R code from vignettes ...
  'CoGAPS.Rmd' using 'UTF-8'... OK
 NONE
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

Status: 3 WARNINGs, 3 NOTEs
See
  'C:/Users/lvovs/Documents/CoGAPS/CoGAPS.Rcheck/00check.log'
for details.
dimalvovs commented 11 months ago

Making sure the check proceeds generated one error, so the current to-do is:

errors:

warnings:

dimalvovs commented 10 months ago

All done in c4ece06c2381b75cc59a712edada62b4f2aeb59d, closing the issue and locking the master.

Screenshot 2023-10-13 at 12 12 46