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 tounittestandpytestfor 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.serialmetadata 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
- TDDA Blog
- Book
- Quick Reference Guide
- 1-page summary
- Full documentation
- PyCon UK talk (video)
- Mastodon
Authors
- Nick Radcliffe
- Simon Brown
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tdda-3.0.1.tar.gz.
File metadata
- Download URL: tdda-3.0.1.tar.gz
- Upload date:
- Size: 20.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa01c729b0ed4d555ab5cb8ef8335a29f6cc5b19d29cbd5d411d7246525e6f39
|
|
| MD5 |
9b295ae92351ab0519ad940916bca765
|
|
| BLAKE2b-256 |
a21915d3b98373bc13fe4b2b2b8309c78616530a4677101eca2f9369e196efd6
|
File details
Details for the file tdda-3.0.1-py3-none-any.whl.
File metadata
- Download URL: tdda-3.0.1-py3-none-any.whl
- Upload date:
- Size: 20.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d99ddd87c8213901187549b11f90ab320e538ee73d9d136a94d163fd8496f24
|
|
| MD5 |
0262e67c6c3235203bac04ff9aaf0285
|
|
| BLAKE2b-256 |
8d83cfdc709fdd8178b0be5ed3ad2c1063e1fc0a825bdbd12f4346f227ca6b3c
|