Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest: use create_test_island_spec #13

Closed
richelbilderbeek opened this issue Nov 1, 2021 · 1 comment
Closed

Suggest: use create_test_island_spec #13

richelbilderbeek opened this issue Nov 1, 2021 · 1 comment

Comments

@richelbilderbeek
Copy link
Collaborator

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.

Screenshot from 2021-11-01 11-32-19

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!

@richelbilderbeek
Copy link
Collaborator Author

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant