dodgr icon indicating copy to clipboard operation
dodgr copied to clipboard

Fix caching on windows machines

Open mpadge opened this issue 2 years ago • 2 comments

Current checks both on GitHub and CRAN windows machines fail when the cache is switched off. They have been skipped with this line:

https://github.com/ATFutures/dodgr/blob/08c5760c1d9df6c0f0f90b8708061552b991180b/tests/testthat/test-cache.R#L65

Need to find out what is happening on Windows machines and actually fix it, because it probably means that caching is not working properly on those machines.

mpadge avatar Aug 04 '21 16:08 mpadge

Current CRAN version also intermittently fails on linux machines with errors like this:

Running examples in ‘dodgr-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: dodgr_contract_graph
> ### Title: dodgr_contract_graph
> ### Aliases: dodgr_contract_graph
>
> ### ** Examples
>
> graph <- weight_streetnet (hampi)
> nrow (graph) # 5,973
[1] 6813
> graph <- dodgr_contract_graph (graph)
Error in readRDS(fname_c) : error reading from connection
Calls: dodgr_contract_graph -> readRDS
Execution halted

This could and should all be fixed by importing fs and using that to construct all file paths used for caching.

mpadge avatar Jan 27 '22 10:01 mpadge

that didn't fix it, so re-opening. The test logs are entirely uninformative, and say that R CMD check failed because one test failed, yet test results all pass. Need to debug further on an actual windows machine.

mpadge avatar Mar 04 '22 03:03 mpadge