Open DanWismer opened 6 months ago
@jeffreyhanson any idea on this?
Should I just add testthat
here ?
https://github.com/NCC-CNC/wheretowork/blob/316b2567ecc5a7d35572994490c34ec40d2403df/.github/workflows/R-CMD-check-ubuntu.yaml#L54
Wondering how it worked before? Never had this problem.
Yeah that's weird. Is listed testthat in Suggests part of the DESCRIPTION?
Hmm, also check if it's installed in renv?
Its not in the rene.lock file.
I tried renv::instal("testthat") and then renv::snapshot(), however it says the the lockfile is up to date. I think because it is not used in the application code the new version of renv can't pick it up?
We have it listed in the Suggests part of the Description
Hmm, maybe try renv::snapshot(type="explicit")
to capture those in the DESCRTION file?
I tried that, no dice.
I am reading this: https://github.com/rstudio/renv/issues/1019
so I did renv::snapshot(dev=TRUE)
which will included the suggested packages into the renv.lock.
However now it says that the project is out of sync because the following packages are installed, recorded but not used...
I see that renv doesn't capture dependencies in the testthat folder. It considers testthat as separate from the core project.
I ran renv::dependencies(path = "tests/testthat")
and see that these packages are being used, where some are found in the main code base which is fine, but others are only found in the Sugests.
@jeffreyhanson I am getting a weird faliure when it trys to install igraph:
I found out where it is called:
I am wondering if you have a new / different way to calculate reserve sizes, without the need to use igraph
?
Hmm, that's odd. Yeah, you could potentially use the sf package instead of igraph - but that will slow down performance a lot. I would suggest trying to work out why it's failing. The error message suggests that something is going wrong with the C/C++ compiled part of the package (since it's complaining about a DLL file). Looking at the compilation flags in the raw logs, we can see compilation of the igraph package depends on the cpp11 package (e.g., see I'D:/a/wheretowork/wheretowork/renv/staging/1/cpp11/include
). In particular cpp11 is an R package for helping to write C++ code that interfaces with R (see https://cpp11.r-lib.org/). Could you try updating cpp11 in renv to the latest version?
Thanks, I see that cpp11 R package updated at the end of August. I updated to the latest 0.5 version and will see it that works.
Darn, still errors at the same spot. But only for Windows build
Hmm, maybe the issue is one of its other dependencies?
I got it to pass on Windows!
in the igraph 2.0.3
NEWS, GMP is no longer a dependency, and libxml2 and glpk are optional.
I removed those from the R-CMD-check-windows.yaml
script:
https://github.com/NCC-CNC/wheretowork/pull/380/commits/d6513acf105400e07d33d7c80f0e0b6005a2c785
I didn't see these system dependecies for Ubuntu or in the Dockerfile. @jeffreyhanson would you know why?
Ah - nice work tracking that down! No idea why having those dependencies present would cause issues.
This still happens randomly:
I think all these random fails have to do with the string encodings?
The random tests fail when simulated WTW data is generated, then saved using write_project. And then read using read_project.
It says that there is NULL in x$
which is weird.
can not subset columns that don't exists
Yeah, that's odd - no idea what's going wrong here sorry. To help with debugging this, you could throw error messages that describe the contexts of x
. E.g., something like: stop(names(x))
or stop(length(x))