UrbanAnalyst / dodgr

Distances on Directed Graphs in R
https://urbananalyst.github.io/dodgr/
127 stars 16 forks source link

Fix caching on windows machines #163

Closed mpadge closed 4 months ago

mpadge commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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.