/core-suite

Core suite of tests for Dataproofer

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

core-suite

Core suite of tests for Dataproofer. These tests help detect common indicators of database or Excel cut-offs which may suggest missing data.

Table of Contents

Tests

numberOfRowsIs65k.js

src/numberOfRowsIs65k.js:12-31

Test to see if number of rows is exactly 65,536 rows (cutoff by Excel)

Parameters

  • rows Array an array of objects representing rows in the spreadsheet
  • columnHeads Array an array of strings for column names of the spreadsheet

Returns Object describing the result

integerEquals2097152.js

src/integerEquals2097152.js:13-65

Integers at their upper limit

Parameters

  • rows Array an array of objects representing rows in the spreadsheet
  • columnHeads Array an array of strings for column names of the spreadsheet

Returns Object describing the result

checkDuplicateRows.js

src/checkDuplicateRows.js:13-73

Check for any duplicate rows in the spreadsheet.

Parameters

  • rows Array an array of objects representing rows in the spreadsheet
  • columnHeads Array an array of strings for column names of the spreadsheet
  • input Object accept user input, such as selected Columns

Returns Object describing the result

stringsHaveExactly255Characters.js

src/stringsHaveExactly255Characters.js:14-66

Determine the cells that have exactly 255 characters (SQL upper limit error). See ProPublica's bad data guide for further information https://github.com/propublica/guides/blob/master/data-bulletproofing.md#integrity-checks-for-every-data-set

Parameters

  • rows Array an array of objects representing rows in the spreadsheet
  • columnHeads Array an array of strings for column names of the spreadsheet

Returns Object describing the result

Development

Getting Started

git clone git@github.com:dataproofer/core-suite.git
cd core-suite
npm install

Writing Tests

Building Docs

We use documentation.js, but have created a handy script for regenerating documentation.

npm run docs

Then open up and check your docs in DOCUMENTATION.md