karthik / testdat

A package to run unit tests on tabular data
142 stars 20 forks source link

Clear understanding of testdat usecase #18

Open hilaryparker opened 10 years ago

hilaryparker commented 10 years ago

Alyssa, Ted and I were just discussing this -- can we clearly define the usecase for testdat?

The way I am envisioning it, the testdat suite is something that you'll want to run immediately after loading a dataset in order to understand it. That is, it'll be dat <- read.csv("data.csv") then test_continuous_dat(dat) etc. Then in your documentation you might have a small section "testing data" where you display the results of these tests. Should we write up documentation outlining this?

karthik commented 10 years ago

yes, please!

karthik commented 10 years ago

To elaborate, I was thinking perhaps, that people can add assertions based on the type of data they are working with. So if someone will have dates, they can add some assertions to test date related issues. etc.

hilaryparker commented 10 years ago

Great! Will work on this now.

karthik commented 10 years ago

If you need more datasets to test, I can throw a few more into the local folder.

davharris commented 10 years ago

Would it be possible/desirable to integrate any of this with @hadley's testthat expectations? Like, expect_no_nas.

karthik commented 10 years ago

@davharris We are wrapping in custom testdat expectations (if none already exist). See this pr for an example.

hilaryparker commented 10 years ago

First pass: https://github.com/ropensci/testdat/blob/master/README.md#use-cases