测试驱动的数据分析

tdda的Python项目详细描述


这是什么?

tdda python模块为 数据分析的整个过程,通过以下工具:

  • 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: tools (and API) for automatically inferring regular expressions from text data.

安装

安装所有tdda python模块的最简单方法是使用pip

pip install tdda

包括所有示例在内的全套源代码都可以从 PYPI带:

pip download –no-binary :all: tdda

这些资源也可以从github公开获得:

git clone git@github.com:tdda/tdda.git

文档可在http://tdda.readthedocs.io获得。

如果克隆github repo,请使用

python setup.py install

然后安装命令行工具(tddarexpy)。

引用测试

tdda.referencetest库用于支持 基于unittest或pytest创建引用测试

这些测试与其他测试一样,除了:

  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.

有关源分发或签出的更多详细信息,请参见readme.md 文件和示例位于referencetest子目录中。

约束

tdda.constraints库用于“发现”约束 从(pandas)数据框中,将它们写为json,并验证 数据集满足约束文件中的约束。

有关源分发或签出的更多详细信息,请参见readme.md 文件和示例位于constraints子目录中。

查找正则表达式

tdda存储库还包括一个自动 从单个数据示例字段推断正则表达式。

资源

有关这些主题的资源包括:

所有示例、测试和代码都在Python2.7、Python3.5和Python3.6下运行。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Rest DSL路由无法启动路由,因为同一端点不允许有多个使用者   jvm有没有像JConsole或VisualVM这样的工具可以告诉我“类、对象、引用变量在java中存储在哪里?”   java为什么我的列表中的所有元素看起来都一样?   java运行时。运行shell脚本的exec无法打开文件   JPopupMenu的JMenuItem的java热键   会话在Java中被覆盖   如何在java中去除字符串中的尖锐重音?   java Mockito监视一个接口,模拟它的默认方法,获取NullPointerException   javascript如何在jquery中禁用同一时间选择   将数组列表附加到现有CSV文件,但它会附加并清除存储在Java文件中的以前的数据   java从我的jar中访问pdf文件   java Sonar issue参数必须为非Null,但标记为可为Null   java Salesforce流式API:在网络故障之后和重新订阅之前获取事件   在Java 1.8.0_65上运行Play2.0应用程序时出现playframework错误   java为什么字母的ASCII由方法自动转换。toCharArray()?   java如何知道JDialog是否关闭?   java向服务器发送POST请求,服务器的响应为null,启动   java如何设置JTable中特定单元格的值?   ImagePlus中的java保存问题