面向对象的磁盘序列化和存储库管理。
oops_datedir_repo的Python项目详细描述
Copyright (c) 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/>. GNU Lesser General Public License version 3 (see the file LICENSE).
这是python oops项目的一个组件: https://launchpad.net/python-oops。oops报告就是一个报告 关于一个软件出错的事情…因此,一个“oops”:)
此软件包提供磁盘存储、管理和 OOPSE存储在存储库中。生成面向对象程序的程序或服务 如果报表想要持久化 报告。
依赖关系
- Python2.6+
- oops包(https://launchpad.net/python-oops或pypi上的“oops”)。
测试依赖项
用法
oops_datedir_repo是oops包的扩展包。
datedirrepo类提供了一个oops发布服务器(DateDirRepo.publish) 它将把面向对象程序集写入存储库。
检索oopse可以通过使用低级序列化程序完成 函数:可以通过 序列化器rFC822.write()函数,并通过匹配的read()函数读取。
典型用法:
>>> config = oops.Config() >>> with fixtures.TempDir() as tempdir: ... repo = oops_datedir_repo.DateDirRepo('/tmp/demo') ... config.publishers.append(repo.publish) ... ids = config.publish({'oops': '!!!'})
有关更多信息,请参阅oops包文档或api文档。
安装
在具有所有可用依赖项的环境中运行setup.py,或者 将工作目录添加到pythonpath。
开发
上游开发发生在https://launchpad.net/python-oops-datedir-repo。 如果依赖项不是 立即可用,您可以使用./bootstrap.py创建bin/buildout,然后 bin/py以获得具有可用依赖项的python解释器。
要使用您选择的运行程序运行测试,测试套件是 oops_datedir_repo.tests.test_套件。
例如:
$ bin/py -m testtools.run oops_datedir_repo.tests.test_suite
如果您有testrepository,您可以使用它运行测试:
$ testr run