Skip to main content

# tdda Test-Driven Data Analysis Functions

Installation

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

pip install tdda

But note that it is not particularly easy to run through the examples using a PyPi binary installation like that. The full set of sources, including all examples, will be 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

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.

For usage details:

>>> import tdda.referencetest
>>> help(tdda.referencetest)

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

An older implementation of these ideas is available as a unittest wrapper class, WritableTestCase, in writabletestcase.py. This can be imported directly with from tdda.writabletestcase import WritableTestCase. Examples of using this are currently available in the deprecated subdirectory. This older version will be fully deprecated and removed soon.

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:

>>> import tdda.constraints
>>> help(tdda.constraints)

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

Resources

Resources on these topics include:

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

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

For usage details:

>>> import tdda.rexpy
>>> help(tdda.rexpy)

Release files for tdda 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tdda 0.2.4
File Size Uploaded
tdda-0.2.4.tar.gz 115.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tdda 0.2.4
File Interpreter ABI Platform
tdda-0.2.4-py3-none-any.whl Python 3 none any Details
tdda-0.2.4-py2-none-any.whl Python 2 none any Details

Total release size: 265.2 kB

Release files / tdda-0.2.4.tar.gz

Download URL tdda-0.2.4.tar.gz
Size 115.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0582d8a3d49125ff3fcf90e86d2675104e6f1360dbd21e55d54003732a2f8a8b
BLAKE2b-256 checksum
How to use checksums
594429f0e1478af1a05c3d3df1e51d0aa646a1f724571494aded883a35edbcd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tdda-0.2.4-py3-none-any.whl

Download URL tdda-0.2.4-py3-none-any.whl
Size 74.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8314b917634358689e44fa646a88c0856d6e667f7ee770549fa662ec42e4fcd8
BLAKE2b-256 checksum
How to use checksums
23d9bdb22d18b0743354ebb83748219fd04f4219d72b94b6f50bd52154fc0371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tdda-0.2.4-py2-none-any.whl

Download URL tdda-0.2.4-py2-none-any.whl
Size 74.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
33d360b3d6402d67b8ec701d59020772c84bcab24b2ec7269945155f24e9cfb6
BLAKE2b-256 checksum
How to use checksums
ebecc3461d7d9982b02362a14d697e00a6351a5cdaec26208b53fef811930be9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.3.0

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.9

2 release files

2.2.7

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.2

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.4

2 release files

2.0.1

1 release file

2.0.0

1 release file

1.0.35

1 release file

1.0.31

3 release files

1.0.30

3 release files

1.0.25

3 release files

1.0.23

3 release files

1.0.22

3 release files

1.0.12

3 release files

1.0.11

3 release files

1.0.10

3 release files

1.0.7

3 release files

1.0.6

3 release files

1.0.1

3 release files

1.0.0

3 release files

0.5.13

3 release files

0.5.12

3 release files

0.5.11

3 release files

0.5.10

3 release files

0.5.9

3 release files

0.5.6

3 release files

0.5.4

3 release files

0.4.1

3 release files

0.4.0

3 release files

0.3.9

3 release files

0.3.4

3 release files

0.3.3

3 release files

0.3.2

3 release files

0.3.1

3 release files

0.3.0

3 release files

0.2.7

3 release files

0.2.5

3 release files

This release

0.2.4 This release

3 release files

0.2.3

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page