Exercises
Posted on Fri 25 October 2019 in TDDA
Exercises for the different parts of the tdda library are being developed.
Installation instructions for the library are available here.
Reference Testing
The tdda library has many facilities for making the writing and maintenance of tests easier, particularly when the results being tested are complex, often change, or vary from run to run. These facilities are useful even outside the scope of data analysis/data science.
These exercises exist in two "favours". Readers who have no strong
preference or actively use the unittest
library from Python's
standard library will probably prefer the unittest-flavoured
versions of the exercises. Readers who already use pytest
will
probably prefer the pytest variants. Each video has an accompanying
article, screencast and example datasets. The datasets are included with
installations of the tdda library.
Constraint Generation, Data Verification and Anomaly Testing
The other major aspect of TDDA is the use of constraints to verify data. The library has facilities for
- Verifying data with constraints and detecting individual failing values within data
- Generating constraints from example data
- Generating regular expressions from example data (used in constraint generation, but also available separately).
The constraint generation and data verification functionality is available from the command line and is not specific to Python. Data can be in flat files, data frames or relational databases and all that is necessary is that a Python installation is available to run the constraint generation and verification.
There is also a Python API for the same functionality.
The first exercises developed will concentrate on the command line tools so are language neutral.