No project description provided
Project description
What is it?
The TDDA Python module provides command-line and Python API support for the overall process of data analysis, through the following tools:
Reference Testing: extensions to unittest and pytest for managing testing of data analysis pipelines, where the results are typically much larger, and more complex, than single numerical values.
Constraints: tools (and API) for discovery of constraints from data, for validation of constraints on new data, and for anomaly detection.
Finding Regular Expressions (Rexpy): tools (and API) for automatically inferring regular expressions from text data.
Automatic Test Generation (Gentest): TDDA can generate tests for more-or-less any command that can be run from a command line, whether it be Python code, R code, a shell script, a shell command, a Makefile or a multi-language pipeline involving compiled code. _”Gentest writes tests, so you don’t have to.”™_
<img width=”100%” src=”doc/source/image/tdda-machines-light.png”/>
Documentation
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).
Reference Tests
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:
They have special support for comparing strings to files and files to files.
That support includes the ability to provide exclusion patterns (for things like dates and versions that might be in the output).
When a string/file assertion fails, it spits out the command you need to diff the output.
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.
They have special support for handling CSV files.
It supports flags (-w and -W) to rewrite the reference (expected) results once you have confirmed that the new actuals are correct.
For more details from a source distribution or checkout, see the README.md file and examples in the referencetest subdirectory.
Constraints
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 more details from a source distribution or checkout, see the README.md file and examples in the constraints subdirectory.
Finding Regular Expressions
The tdda repository also includes rexpy, a tool for automatically inferring regular expressions from a single field of data examples.
Resources
Resources on these topics include:
TDDA Blog: http://www.tdda.info
Quick Reference Guide (“Cheatsheet”): http://www.tdda.info/pdf/tdda-quickref.pdf
1-page summary: https://stochasticsolutions.com/pdf/TDDA-One-Pager.pdf
Full documentation: http://tdda.readthedocs.io
General Notes on Constraints and Assertions: http://www.tdda.info/constraints-and-assertions
Notes on using the Pandas constraints library: http://www.tdda.info/constraint-discovery-and-verification-for-pandas-dataframes
- PyCon UK Talk on TDDA:
Slides and Rough Transcript: http://www.tdda.info/slides-and-rough-transcript-of-tdda-talk-from-pycon-uk-2016
<a rel=”me” href=”https://mathstodon.xyz/@tdda”>Mastodon</a>
All examples, tests and code run under Python 2.7, Python 3.5 and Python 3.6.
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
File details
Details for the file tdda-2.2.5.tar.gz
.
File metadata
- Download URL: tdda-2.2.5.tar.gz
- Upload date:
- Size: 12.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d67efa42d6ce7f7e342c259e2cc453718a7be9a381ffbb848714473f7f5c05e8 |
|
MD5 | b5f7e48df200c6cd59acf97bdf44a7e4 |
|
BLAKE2b-256 | ae44c65820852c47a8ac705d8d41e2869de5823e7840d46293d680e3acb52d93 |
File details
Details for the file tdda-2.2.5-py3-none-any.whl
.
File metadata
- Download URL: tdda-2.2.5-py3-none-any.whl
- Upload date:
- Size: 12.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2302f027014263be569b1b8a0d63b50488f6a2de577162a641288ba53b6a59f1 |
|
MD5 | e1da1d233de869d2789cddbb083d8f35 |
|
BLAKE2b-256 | 5c697f46f33513ea7c4ff39d56be6b7c670a9e234b7dce32b0b4737ef111f654 |