karthik / testdat

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

Code duplication between test_NA and fix_NA #27

Open davharris opened 10 years ago

davharris commented 10 years ago

There's a lot of duplication between the code in test_NA and fix_NA. For example, both functions have lists of NA strings like -999, and it would be easy for these to get out of sync.

What do folks (especially @hilaryparker) think of this division of labor between the functions:

If I get the go-ahead, I'm happy to make a pull request for it.

karthik commented 10 years ago

Hi @davharris

Thanks for the note. There is quite likely a lot of code overlap between the test and fix functions. I haven't worried about rebasing code yet, since it feels a bit premature for that. Once all the functions for the first round of tests are complete, it might be worth doing this then.

That said, feel free to go ahead and submit a pull request. Much appreciated. I just can't work on it for another week since there is still hackathon stuff to finish and also a big proposal due next week.

Cheers

hilaryparker commented 10 years ago

Hey @davharris, that sounds like a great idea! Makes it much easier since I was updating both functions at once when adding new NA examples, etc.