Dataproofer icon indicating copy to clipboard operation
Dataproofer copied to clipboard

Test: location column has all expected, sequential values #10

Open newsroomdev opened this issue 10 years ago • 3 comments

Please read how to create a new test if you're interested in writing this test.

All US cities, counties, or states if the 3/4s of the cells make a complete list

Assumptions: Is 3/4s a suitable cut-off? Should it be higher or lower?

newsroomdev avatar Jan 13 '16 17:01 newsroomdev

@geraldarthur Can you explain the 3/4s concept a little more? Not sure what you mean

ejfox avatar Mar 25 '16 17:03 ejfox

My initial thinking was we'd have the test only run if it looks like a column labeled state has most of the 50 states. But with test toggles, we can let the user select when they do and don't want to run that test.

Next steps here would be to write up a test that checks a column name state and see if it can detect any missing states.

newsroomdev avatar Mar 25 '16 18:03 newsroomdev

Summary

Took a first stab at this. Need to QA it a bit more @ejfox @enjalot. Could you look over my logic and help me poke holes in this?

Inputs

Basically, I've formatted the test so there's an area for folks to add/remove lists of things to check against. This may come in handy in later versions if user input becomes a feature.

Methdology

For now, the test counts up the occurrences of each state's name, postal code, or ap abbreviation in any column labeled state. If any count is exactly 0 after it gets done looping, the test will fail.

How could it be different?

  • Counts work regardless of the format. Right now i'm assuming a column won't switch between full names and abbreviations
  • Logic could be DRY'd out a bit.

Next steps

Can you look over this and give me a :+1: or :-1:?

newsroomdev avatar Apr 11 '16 22:04 newsroomdev