Giter Site home page Giter Site logo

tdda's Introduction

Test-Driven Data Analysis (Python TDDA library)

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 [email protected]: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.

tdda's People

Contributors

simonbrownsb avatar njr0 avatar tdda avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.