enzoampil / fastquant

fastquant — Backtest and optimize your ML trading strategies with only 3 lines of code!
MIT License
1.52k stars 239 forks source link

[BUG] R Build spontaneously fails #277

Closed enzoampil closed 3 years ago

enzoampil commented 3 years ago

@jgendrinal Wonder what's causing this.

Error message from commit 4d25412ac462abfd3dd30c080f84351b5af3ff95:

Worker information
0.14s0.01s0.00s0.01s
system_info
Build system information
0.01s0.00s0.69s0.20s0.05s0.00s0.04s0.00s0.01s0.01s0.01s0.01s0.01s0.00s0.00s0.02s0.00s0.01s0.27s0.00s0.00s0.00s0.01s0.00s0.09s0.00s0.73s0.00s0.00s6.03s0.00s2.51s0.00s2.38s
docker_mtu
resolvconf
Please file any issues at https://travis-ci.community/c/languages/r
and mention @jeroen and @jimhester in the issue
R-install
Installing R
0.00s
git.checkout
2.23s$ git clone --depth=50 --branch=master https://github.com/enzoampil/fastquant.git enzoampil/fastquant
0.01s
cache.1
Setting up build cache
package
Setting up package cache
R-session-info
R session information
install.1
5.03s$ R -e 'install.packages("devtools")'
install.2
6.59s$ R -e 'devtools::install_deps("R", dependencies = TRUE)'
install.3
0.00s$ cd R
install.4
0.24s$ R CMD build .
install.5
2.97s$ R CMD INSTALL *tar.gz
26.64s$ R CMD check --as-cran *tar.gz
* using log directory ‘/home/travis/build/enzoampil/fastquant/R/fastquant.Rcheck’
* using R Under development (unstable) (2020-10-23 r79366)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
* checking for file ‘fastquant/DESCRIPTION’ ... OK
* this is package ‘fastquant’ version ‘0.1.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 serialization versions ... OK
* checking whether package ‘fastquant’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... 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 ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking examples ... OK
* checking examples with --run-donttest ... ERROR
Running examples in ‘fastquant-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: get_stock_data
> ### Title: Returns pricing data for a specified stock
> ### Aliases: get_stock_data
> 
> ### ** Examples
> 
> ## No test: 
>   get_stock_data("JFC", "2019-01-03", "2019-02-01") # PSE data
Error: Problem with `mutate()` input `data`.
✖ lexical error: invalid char in json text.
                                       <html><head> <meta http-equiv="
                     (right here) ------^
ℹ Input `data` is `map2(symbol, dt, get_stock_data_by_date)`.
Backtrace:
     █
  1. ├─fastquant::get_stock_data("JFC", "2019-01-03", "2019-02-01")
  2. │ └─`%>%`(...)
  3. │   ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4. │   └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  5. │     └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  6. │       └─fastquant:::`_fseq`(`_lhs`)
  7. │         └─magrittr::freduce(value, `_function_list`)
  8. │           └─function_list[[i]](value)
  9. │             ├─dplyr::mutate(., data = map2(symbol, dt, get_stock_data_by_date))
 10. │             └─dplyr:::mutate.data.frame(., data = map2(symbol, dt, get_stock_data_by_date))
 11. │               └─dplyr:::mutate_cols(.data, ...)
 12. │                 ├─base::withCallingHandlers(...)
 13. │                 └─mask$eval_all_mutate(dots[[i]])
 14. ├─purrr::map2(symbol, dt, get_stock_data_by_date)
 15. │ └─fastquant:::.f(.x[[i]], .y[[i]], ...)
 16. │   └─`%>%`(...)
 17. │     ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
 18. │     └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
 19. │       └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
 20. │         └─fastquant:::`_fseq`(`_lhs`)
 21. │           └─magrittr::freduce(value, `_function_list`)
 22. │             ├─base::withVisible(function_list[[k]](value))
 23. │             └─function_list[[k]](value)
 24. │               └─httr::content(., type = "application/json")
 25. │                 └─httr:::parse_auto(raw, type, encoding, ...)
 26. │                   └─httr:::parser(...)
 27. │                     └─jsonlite::fromJSON(...)
 28. │                       └─jsonlite:::parse_and_simplify(...)
 29. │                         └─jsonlite:::parseJSON(txt, bigint_as_char)
 30. │                           └─jsonlite:::parse_string(txt, bigint_as_char)
 31. └─base::.handleSimpleError(...)
 32.   └─dplyr:::h(simpleError(msg, call))
Execution halted
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘spelling.R’
  Comparing ‘spelling.Rout’ to ‘spelling.Rout.save’ ...6,19d5
< Potential spelling errors:
<   WORD             FOUND IN
< backtest         description:1
< Backtest         title:1
< Binance          get_crypto_data.Rd:5,11,23
< crypto           get_crypto_data.Rd:14,17
< cryptocurrency   get_crypto_data.Rd:10
< cypto            get_crypto_data.Rd:5,23
< dt               get_stock_data.Rd:24,27,29
< PSE              get_stock_data.Rd:10
< tibble           get_crypto_data.Rd:20
<                  get_stock_data.Rd:21
< YYYY             get_crypto_data.Rd:13,16
<                  get_stock_data.Rd:14,17
  Running ‘testthat.R’
 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
                                         <html><head> <meta http-equiv="
                       (right here) ------^

  ℹ Input `data` is `map2(symbol, dt, get_stock_data_by_date)`.
  Backtrace:
    1. fastquant::get_stock_data("JFC", "2018-01-01", "2018-03-31")
   31. base::.handleSimpleError(...)
   32. dplyr:::h(simpleError(msg, call))

  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 5 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
  1. Error: (unknown) (@test-get-stock.R#3) 

  Error: testthat unit tests failed
  Execution halted
* checking PDF version of manual ... OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 2 ERRORs
See
  ‘/home/travis/build/enzoampil/fastquant/R/fastquant.Rcheck/00check.log’
for details.
The command "R CMD check --as-cran *tar.gz" exited with 1.
cache.2
store build cache
Done. Your build exited with 1.
ghost commented 3 years ago

New R dev version. Will resolve end of week

ghost commented 3 years ago

281