将时间线与oops错误报告集成。
oops_timeline的Python项目详细描述
Copyright (c) 2010, 2011, Canonical Ltd
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 only.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
oops_timeline包提供了timeline对象之间的集成胶水 (http://pypi.python.org/pypi/timeline)和oops错误报告系统 (http://pypi.python.org/pypi/oops)。
依赖关系
- Python2.6+
- 哎呀(http://pypi.python.org/pypi/oops)
- 时间线(http://pypi.python.org/pypi/timeline)
测试依赖项
用法
oops_timeline提供了一个oops on_create挂钩,从中提取时间线数据 oops_context['timeline']并将其作为原始数据注入oops报表。
设置您的配置:
>>> from oops import Config >>> config = Config()
请注意,您可能需要至少一个发布者,或者您的报告将 被丢弃。
将timneline钩子添加到配置:
>>> oops_timeline.install_hooks(config)
这是一个方便的功能,以防将来需要额外的钩子。
有关更多信息,请参阅pydoc oops_timeline。
安装
在具有所有可用依赖项的环境中运行setup.py,或者 将工作目录添加到pythonpath。
开发
上游开发发生在https://launchpad.net/python-oops-timeline。 如果依赖项不是 立即可用,您可以使用./bootstrap.py创建bin/buildout,然后 bin/py以获得具有可用依赖项的python解释器。
要使用您选择的运行程序运行测试,测试套件是 oops.tests.test_套件。
例如:
$ bin/py -m testtools.run oops_timeline.tests.test_suite