Skip to main content

Test-driven data analysis: command-line tools and Python APIs for data validation, testing analytical pipelines, automatic test generation and more.

Project description

Test-Driven Data Analysis (TDDA)

The tdda package provides Python support for test-driven data analysis (1-page summary, blog, book).

Features

  • Reference Testing (tdda.referencetest): extensions to unittest and pytest for testing data analysis pipelines. Supports file-based comparisons, semantic equivalence, automatic rewriting of reference results, and test tagging.

  • Automatic Test Generation (tdda gentest): generates reference tests for any command-line script or program (Python, R, shell, Makefile, ...). "Gentest writes tests, so you don't have to."

  • Constraints (tdda.constraints): discovers constraints from Pandas DataFrames, Parquet files, flat files, and relational databases; verifies new data against those constraints; detects failing records.

  • Regular Expression Inference (tdda.rexpy): automatically infers regular expressions from a column of string data.

  • Data Diff (tdda diff): compares data frames in Parquet or flat files and reports differences in a visual format.

  • Serial Format (tdda.serial): documents CSV and flat-file formats in .serial metadata files for accurate, portable reading and writing. Supports conversion to/from CSVW and Frictionless metadata.

  • Utility Functions (tdda.utils): Unicode normalization (Normal Form TK), glyph counting, and RFC 9839 support.

Documentation

Full documentation: tdda.readthedocs.io

Installation

pip install tdda

To upgrade an existing installation:

pip install -U tdda

Source installation

git clone https://github.com/tdda/tdda.git
cd tdda
pip install .

Optional database support

pip install pygresql                  # PostgreSQL
pip install mysql-connector-python   # MySQL/MariaDB
pip install pymongo                  # MongoDB

Testing

tdda test

Resources

Authors

  • Nick Radcliffe
  • Simon Brown

Project details


Release history Release notifications | RSS feed

This version

3.2.2

Download files

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

Source Distribution

tdda-3.2.2.tar.gz (19.4 MB view details)

Uploaded Source

Built Distribution

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

tdda-3.2.2-py3-none-any.whl (20.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tdda-3.2.2.tar.gz
  • Upload date:
  • Size: 19.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tdda-3.2.2.tar.gz
Algorithm Hash digest
SHA256 d0af4a178d9cebf8b02d26b8f31bb9234c4afef01d0dfdd753769f12cb115ef1
MD5 cf44a004fd39efa80d55831aa8246a7a
BLAKE2b-256 67fd3ae754e02a83c1a76db82bcd2df01a625dede6c1e824cf7112c0f0f0d1c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tdda-3.2.2-py3-none-any.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tdda-3.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d2dddc5b5c759da99998301da80d3af687cfb1572d2f2f1fc4aec86f3d43543e
MD5 d13cd318f272095c5d6d127178e4aa1d
BLAKE2b-256 52a0f7f58e73c14246fbe36bc59ec320a458c56b9fd4f546f2016d1932c69bca

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