ATFutures / geoplumber

Serve geographic data from R and consume with scalable front end.
https://atfutures.github.io/geoplumber/
59 stars 7 forks source link

devtools check is failing #10

Closed Robinlovelace closed 6 years ago

Robinlovelace commented 6 years ago

Ctl-Shift-E checks if the package is set-up according to best practices. Currently it fails:

devtools::check("/home/robin/repos/geoplumber/")
#> Updating geoplumber documentation
#> Loading geoplumber
#> Writing NAMESPACE
#> Writing NAMESPACE
#> Setting env vars ---------------------------------------------------------
#> CFLAGS  : -Wall -pedantic
#> CXXFLAGS: -Wall -pedantic
#> Building geoplumber ------------------------------------------------------
#> '/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
#>   --quiet CMD build '/home/robin/repos/geoplumber' --no-resave-data  \
#>   --no-manual
#> 
#> Setting env vars ---------------------------------------------------------
#> _R_CHECK_CRAN_INCOMING_USE_ASPELL_: TRUE
#> _R_CHECK_CRAN_INCOMING_           : FALSE
#> _R_CHECK_FORCE_SUGGESTS_          : FALSE
#> Checking geoplumber ------------------------------------------------------
#> '/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
#>   --quiet CMD check '/tmp/RtmpDcubgq/geoplumber_0.0.0.9000.tar.gz'  \
#>   --as-cran --timings --no-manual
#> 
#> R CMD check results
#> 1 error  | 4 warnings | 3 notes
#> checking examples ... ERROR
#> Running examples in ‘geoplumber-Ex.R’ failed
#> The error most likely occurred in:
#> 
#> > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
#> > ### Name: gp_install_npm_package
#> > ### Title: Install an npm package locally
#> > ### Aliases: gp_install_npm_package
#> > 
#> > ### ** Examples
#> ... 81 lines ...
#> + options(digits = 7L)
#> + base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
#> + grDevices::dev.off()
#> + ###
#> + ### Local variables: ***
#> + ### mode: outline-minor ***
#> + ### outline-regexp: "\\(> \\)?### [*]+" ***
#> + ### End: ***
#> + quit('no')
#> + Error: unexpected end of input
#> Execution halted
#> 
#> checking whether package ‘geoplumber’ can be installed ... WARNING
#> Found the following significant warnings:
#>   Warning: /tmp/RtmpDcubgq/geoplumber.Rcheck/00_pkg_src/geoplumber/man/gp_install_npm_package.Rd:16: unexpected VERBATIM TEXT ' {
#>   Warning: /tmp/RtmpDcubgq/geoplumber.Rcheck/00_pkg_src/geoplumber/man/gp_install_npm_package.Rd:19: unexpected '}'
#> See ‘/tmp/RtmpDcubgq/geoplumber.Rcheck/00install.out’ for details.
#> 
#> checking Rd files ... WARNING
#> prepare_Rd: gp_install_npm_package.Rd:16: unexpected VERBATIM TEXT ' {
#> ', expecting '{'
#> prepare_Rd: gp_install_npm_package.Rd:19: unexpected '}'
#> 
#> checking Rd \usage sections ... WARNING
#> Undocumented arguments in documentation object 'gp_create'
#>   ‘project_name’
#> Documented arguments not in \usage in documentation object 'gp_create':
#>   ‘dest’
#> 
#> Undocumented arguments in documentation object 'gp_install_npm_package'
#>   ‘pkg’
#> Documented arguments not in \usage in documentation object 'gp_install_npm_package':
#>   ‘name’
#> 
#> 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 for unstated dependencies in examples ... WARNING
#> Warning: parse error in file 'geoplumber-Ex.R':
#> 0: unexpected end of input
#> 131: ### End: ***
#> 132: quit('no')
#>     ^
#> 
#> checking DESCRIPTION meta-information ... NOTE
#> Malformed Title field: should not end in a period.
#> 
#> checking top-level files ... NOTE
#> File
#>   LICENSE
#> is not mentioned in the DESCRIPTION file.
#> 
#> checking Rd line widths ... NOTE
#> Rd file 'meta.Rd':
#>   \examples lines wider than 100 characters:
#>      u = "https://data.cdrc.ac.uk/dataset/c90eee49-6f92-4508-ac36-6df56853f817/resource/d39d9d89-0478-4f75-a166-1a445bf42f9c/download/metada ... [TRUNCATED]
#> 
#> These lines will be truncated in the PDF manual.

Created on 2018-08-31 by the reprex package (v0.2.0).

layik commented 6 years ago

Thanks Robin! Glad you are “check”ing it.

layik commented 6 years ago

I think you fixed this? So won’t do anything.

Robinlovelace commented 6 years ago

No it's still failing. Please test regularly, worth testing before each change. CI will do that automagically but for now it's worth doing manually.

layik commented 6 years ago

On it.

layik commented 6 years ago

The output was not helpful, I might raise a ticket to the devtools guys, default colour for error but orange for warnings?

I found the issue, the example would not run in the code, but I only give a warning and on purpose do not throw an error. Dont know why check was not happy with that. https://github.com/ATFutures/geoplumber/commit/487fbffc252e600dca61b497692bfadc93662471#diff-31f2bff49f40b92420ed555e78d80561L17

https://github.com/ATFutures/geoplumber/blob/master/R/gp_install_npm_package.R#L16

If you are happy, we can close the ticket.

Robinlovelace commented 6 years ago

Let me double 'check' it first. Agree re output colour raising an issue +1

layik commented 6 years ago

https://github.com/r-lib/devtools/issues/1856 raised.

Robinlovelace commented 6 years ago

Still getting errors, in the tests now.

layik commented 6 years ago

Thanks @Robinlovelace, had to have a weekend so didn't reply. It was due to the change in meta data and also me leaving failed test in there. Should be good in the next commit.

Robinlovelace commented 6 years ago

Yep fixed, great work!

devtools::check("/home/robin/repos/geoplumber/")
#> Updating geoplumber documentation
#> Loading geoplumber
#> Warning: @export [/home/robin/repos/geoplumber/R/
#> gp_endpoint_from_clip.R#8]: may only span a single line
#> Writing NAMESPACE
#> Writing NAMESPACE
#> Setting env vars ---------------------------------------------------------
#> CFLAGS  : -Wall -pedantic
#> CXXFLAGS: -Wall -pedantic
#> Building geoplumber ------------------------------------------------------
#> '/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
#>   --quiet CMD build '/home/robin/repos/geoplumber' --no-resave-data  \
#>   --no-manual
#> 
#> Setting env vars ---------------------------------------------------------
#> _R_CHECK_CRAN_INCOMING_USE_ASPELL_: TRUE
#> _R_CHECK_CRAN_INCOMING_           : FALSE
#> _R_CHECK_FORCE_SUGGESTS_          : FALSE
#> Checking geoplumber ------------------------------------------------------
#> '/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
#>   --quiet CMD check '/tmp/Rtmp3zFdXg/geoplumber_0.0.0.9000.tar.gz'  \
#>   --as-cran --timings --no-manual
#> 
#> R CMD check results
#> 0 errors | 0 warnings | 3 notes
#> checking DESCRIPTION meta-information ... NOTE
#> Malformed Title field: should not end in a period.
#> 
#> checking top-level files ... NOTE
#> File
#>   LICENSE
#> is not mentioned in the DESCRIPTION file.
#> Non-standard file/directory found at top level:
#>   ‘README.Rmd’
#> 
#> checking Rd line widths ... NOTE
#> Rd file 'meta.Rd':
#>   \examples lines wider than 100 characters:
#>      u = "https://data.cdrc.ac.uk/dataset/c90eee49-6f92-4508-ac36-6df56853f817/resource/d39d9d89-0478-4f75-a166-1a445bf42f9c/download/metada ... [TRUNCATED]
#> 
#> These lines will be truncated in the PDF manual.

Created on 2018-09-03 by the reprex package (v0.2.0).

Robinlovelace commented 6 years ago

I suggest we open source this package soon. Will open an issue.