Suggest: use `create_test_island_spec`
richelbilderbeek opened this issue · comments
Dear DAISIEmainland maintainer,
Thanks for DAISIEmainland and its thorough testing! One of my favorite functions in that regard is create_test_island_spec
, with examples for 43 scenarios! That seems like a solid foundation for a solid R package!
What is unexpected, however, is that it is never actually used, e.g. in plotting functions. Also, the tests for some scenarios is exactly the same:
test_that("create_test_island_spec produces correct output for scenario 42", {
island_spec <- create_test_island_spec(island_scenario = 42)
expect_true(is.data.frame(island_spec))
expect_true(ncol(island_spec) == 7)
expect_true(nrow(island_spec) == 2)
})
test_that("create_test_island_spec produces correct output for scenario 43", {
island_spec <- create_test_island_spec(island_scenario = 43)
expect_true(is.data.frame(island_spec))
expect_true(ncol(island_spec) == 7)
expect_true(nrow(island_spec) == 2)
})
In other words, the different scenarios are untested to be different.
From this line of reasoning, the create_test_island_spec
appears to have underused potential. I do predict this function had their use for e.g. a function plotting the ontology (#11), but as that plotting functionality did not get in, create_test_island_spec
was left close to empty handed.
I do see that some scenarios of create_test_island_spec
are used (see below), yet nowhere I see a test with e.g. scenario 42 and 43 give different results.
As an observant user, I hope I can see all create_test_island_spec
scenario's shine, it would definitely be helpful to be sure DAISIEmainland works awesomely!
Well, thanks to #16, I will test this myself. Done!
I will take the liberty to close this Issue myself, predicting Josh will approve of my bashfulness :-)