Closed ehwenk closed 1 month ago
It seems to be caused by line 595 in testdata.R
. I get the error when I load any individual metadata.yml file without contexts, but for some reason it doesn't throw an error when run on my machine. A solution is to change the code to:
if(is.na(metadata[["contexts"]])) {
context_properties <- metadata[["contexts"]]
context_vars_in <- metadata[["contexts"]]
} else {
context_properties <- sapply(metadata[["contexts"]], "[[", "context_property")
context_vars_in <- sapply(metadata[["contexts"]], "[[", "var_in")
}
One of the tests in
dataset_test()
is failing for a database where the contexts table is empty. We've discovered this starting the new thermal tolerance database. The datasets pass with no test failures if added to the austraits.build repository, but has a single error pertaining to contexts if it is in the new repository; error likely seems related to empty tables.Kris gets the following error:
Oddly, when I create a new repository with the same traits.yml file and the same dataset I get no error.