Skip to main content

Test Driven Data Analysis

Project description

Installation

The simplest way to install all of the TDDA Python modules is using pip:

pip install tdda

The full set of sources, including all examples, are downloadable from PyPi with:

pip download –no-binary :all: tdda

The sources are also publicly available from Github:

git clone git@github.com:tdda/tdda.git

Documentation is available at http://tdda.readthedocs.io.

If you clone the Github repo, use

python setup.py install

afterwards to install the command-line tools (tdda and rexpy).

Level 0:

The tdda.referencetest library is used to support the creation of reference tests, based on either unittest or pytest.

These are like other tests except:

  1. They have special support for comparing strings to files and files to files.

  2. That support includes the ability to provide exclusion patterns (for things like dates and versions that might be in the output).

  3. When a string/file assertion fails, it spits out the command you need to diff the output.

  4. If there were exclusion patterns, it also writes modified versions of both the actual and expected output and also prints the diff command needed to compare those.

  5. They have special support for handling CSV files.

  6. It supports flags (-w and -W) to rewrite the reference (expected) results once you have confirmed that the new actuals are correct.

The package includes docstrings, available with:

>>> from tdda import referencetest
>>> help(referencetest)

For more details from a source distribution or checkout, see the README.md file and examples in the referencetest subdirectory.

Level 1:

The tdda.constraints library is used to ‘discover’ constraints from a (Pandas) DataFrame, write them out as JSON, and to verify that datasets meet the constraints in the constraints file.

For usage details:

>>> from tdda import constraints
>>> help(constraints)

For more details from a source distribution or checkout, see the README.md file and examples in the constraints subdirectory.

The tdda repository also includes rexpy, a tool for automatically inferring regular expressions from a single field of data examples.

The package also has doc strings, which you can see with:

>>> from tdda import rexpy
>>> help(rexpy)

Resources

Resources on these topics include:

All examples, tests and code should run under Python2 and Python3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tdda-0.5.6.tar.gz (162.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tdda-0.5.6-py3-none-any.whl (213.8 kB view details)

Uploaded Python 3

tdda-0.5.6-py2-none-any.whl (213.9 kB view details)

Uploaded Python 2

File details

Details for the file tdda-0.5.6.tar.gz.

File metadata

  • Download URL: tdda-0.5.6.tar.gz
  • Upload date:
  • Size: 162.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tdda-0.5.6.tar.gz
Algorithm Hash digest
SHA256 c3b7486140ec6aa0546053adb75c73c9cc49c4132946a1dd642778cdc61ce400
MD5 eae74bd9bac286d9e95e3436d704a887
BLAKE2b-256 b44cc0e04438f420038cd5c898ec541ac5cfdd4881c2a375ded764e3917439c0

See more details on using hashes here.

File details

Details for the file tdda-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: tdda-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 213.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tdda-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ed731bf1fcf1f6e7983e5e4588eb1b33b0fad12940e27de36891e9028a98333f
MD5 6904d1a92853421106490ea9fe13a50d
BLAKE2b-256 6e2bd972877c3b1449aa04ecd28ae3c81c18f57dfcec0821a5f2f70705d81e8e

See more details on using hashes here.

File details

Details for the file tdda-0.5.6-py2-none-any.whl.

File metadata

  • Download URL: tdda-0.5.6-py2-none-any.whl
  • Upload date:
  • Size: 213.9 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tdda-0.5.6-py2-none-any.whl
Algorithm Hash digest
SHA256 a2afb24e7f8812ea728c1552f8070ed6fe12d90026844686ac8503ee3cf24690
MD5 a79720d3b186b32e62c99e2b3b2ecdac
BLAKE2b-256 050787e5f34d21f41003842c955ba8423a57263109caedb08bf710ccc468f75c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page