Skip to main content

Test driven data-wrangling and analysis for pytest and unittest.

Project description

Current Build Status Development Status Apache 2.0 License Supported Python Versions

Datatest provides tools for test driven data-wrangling and analysis. It supports both pytest and unittest style testing.

You can use datatest to automate checklists, log discrepancies, and measure progress. It encourages a structured approach for preparing messy data that needs to be cleaned, integrated, formatted, and verified.

Installation

The easiest way to install datatest is to use pip:

pip install datatest

To upgrade an existing installation, use the “--upgrade” option:

pip install --upgrade datatest

Stuntman Mike

If you need bug-fixes or features that are not available in the current stable release, you can “pip install” the development version directly from GitHub:

pip install --upgrade https://github.com/shawnbrown/datatest/archive/master.zip

All of the usual caveats for a development install should apply—only use this version if you can risk some instability or if you know exactly what you’re doing. While care is taken to never break the build, it can happen.

Safety-first Clyde

If you need to review and test packages before installing, you can install datatest manually.

Download the latest source distribution from the Python Package Index (PyPI):

https://pypi.org/project/datatest/ (navigate to “Download files”)

Unpack the file (replacing X.Y.Z with the appropriate version number) and review the source code:

tar xvfz datatest-X.Y.Z.tar.gz

Change to the unpacked directory and run the tests:

cd datatest-X.Y.Z
python setup.py test

Don’t worry if some of the tests are skipped. Tests for optional data sources (like pandas DataFrames or MS Excel files) are skipped when the related third-party packages are not installed.

If the source code and test results are satisfactory, install the package:

python setup.py install

Supported Versions

Tested on Python 2.6, 2.7, and 3.1 through 3.6; PyPy and PyPy3. Datatest is pure Python and may also run on other implementations as well (check using “setup.py test” before installing).

Backward Compatibility

If you have existing tests that use API features which have changed since 0.8.0, you can still run your old code by adding the following import to the beginning of each file:

from datatest.__past__ import api08

To maintain existing test code, this project makes a best-effort attempt to provide backward compatibility support for older features. The API will be improved in the future but only in measured and sustainable ways.

All of the data used at the National Committee for an Effective Congress has been checked with datatest for several years so there is, already, a large and growing codebase that relies on current features and must be maintained into the future.

Dependencies

There are no hard, third-party dependencies. But if you want to interface with pandas DataFrames, MS Excel workbooks, or other optional data sources, you will need to install the relevant packages (pandas, xlrd, etc.).


Freely licensed under the Apache License, Version 2.0

Copyright 2014 - 2018 NCEC Services, LLC and contributing authors

Project details


Download files

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

Source Distribution

datatest-0.9.0.tar.gz (80.2 kB view details)

Uploaded Source

Built Distribution

datatest-0.9.0-py2.py3-none-any.whl (93.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file datatest-0.9.0.tar.gz.

File metadata

  • Download URL: datatest-0.9.0.tar.gz
  • Upload date:
  • Size: 80.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for datatest-0.9.0.tar.gz
Algorithm Hash digest
SHA256 d1e96d1762fb2e43132369f47730f6c82094ad3e6340ac51bb98f4487d18b7da
MD5 e6b64200b0a1a285808a5ea00ba6f2a9
BLAKE2b-256 af062add37edc6c65bd713c9b34d0aa9e31c1a1af196210b5cd6eba0c33406f3

See more details on using hashes here.

File details

Details for the file datatest-0.9.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for datatest-0.9.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a7d6865293ac95c2c2356fd179764db2f42491d120fde30c20f87cb4fe5f42d6
MD5 973cfe8509b55cb4f0e98c4871a068b1
BLAKE2b-256 29d24f479e79d9b00f914945386852f18813ea6c0984a7b3d6aeed3983e2f73e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page