用于绘制和收集Bugzilla信息的工具
项目描述
Bugzilla - 数据
一个通过组件、产品、assignee、qa_contact等可视化Bugzilla数据的工具。目前,此工具生成Bugzilla错误的条形图。图表可以根据例如错误组件、assignee、qa_contact等进行排序。图表将自动从高到低排序。这是从示例查询yaml(conf/query.yaml
)生成的图像。
入门指南
使用此工具的基本方法非常简单,
- 创建并激活python 3虚拟环境
pip install -e .
- 运行
python scripts/make_plot.py
make_plot.py
允许的参数是
usage: make_plot.py [-h] [-q QUERY] [-p PLOT] [-u URL] [--save] [--output]
[--login] [--credential_file CREDENTIAL_FILE]
optional arguments:
-h, --help show this help message and exit
-q QUERY, --query QUERY
Path to query yaml file (default: conf/query.yaml)
-p PLOT, --plot PLOT Plot bar chart for BZs found via <query> sorted
according to one of: [component, qa_contact,
assigned_to, creator] (default: component)
-u URL, --url URL Bugzilla URL (default: bugzilla.redhat.com)
--save Save the plot (default: False)
--output Output bugzilla data from query to stdout (default:
False)
--login Login to Bugzilla before making query. Required to use
e.g. savedsearch and to get some hidden fields.
(default: False)
--credential_file CREDENTIAL_FILE
Path to credential yaml file (default:
conf/credentials.yaml)
为了有效地使用此工具,您必须在 conf/query.yaml
中定义有意义的查询。
您可以在查询文件中定义任意数量的查询。每个查询必须以 - query:
开头。
提供了一个简单的示例查询,用于获取Red Hat Cloudforms的NEW
BZ,但可以更复杂。例如,您可以通过以下方式根据创建/报告BZ的特定用户进行获取
- query:
product:
- Red Hat CloudForms Management Engine
status:
- ON_QA
- NEW
- POST
- CLOSED
include_fields:
- id
- summary
- component
- description
- status
- qa_contact
- creator
- assigned_to
- version
reporter:
- <email1>
- <email2>
- <email3>
您还可以通过 qa_contact
或 assigned_to
进行搜索,然后根据这些用户生成图表。有关查询的更多信息,请参阅:https://github.com/python-bugzilla/python-bugzilla,因为这是该用于bugzilla查询的API。请注意,include_fields
列表不是必需的,如果在程序调用中遇到属性错误,可以将其注释掉。如果您处理大量BZ,这可以加快您的查询速度,因为 python-bugzilla
只会获取那些特定字段。
python-bugzilla
的另一个独特功能 是能够登录到Bugzilla并使用您登录下保存的搜索,而不是构建自己的查询。为此,在 conf/credentials.yaml
中创建一个凭据文件,内容如下
- login_info:
username: <your_bz_username>
password: <your_bz_password>
查询时,您可以在 conf/query.yaml
中使用以下内容
- query:
savedsearch: My Bugs # just an example, can be the name of any search defined in your Bugzilla
然后运行脚本并传递 --login
,这样脚本就知道需要登录。
python scripts/make_plot.py --login
项目详细信息
bugzilla-data-0.0.5.tar.gz 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 2e5b8c0ea9d16d828372672e5fdd1b1a740a8b004eb191ae42fb4f66b255df83 |
|
MD5 | 5c6036f8f123e9f41b265410e7654762 |
|
BLAKE2b-256 | a4b79c07214d587ec7a55818c04352e2d1bd2c5341d94c766628026ec44eea82 |