Created
March 17, 2014 23:15
-
-
Save mpkocher/08220f5220bc5f5db894 to your computer and use it in GitHub Desktop.
Generate bugs to verify from bugzilla CSV by state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pandas as pd | |
import pysiv.toolbook as tb | |
_STATES = ("RESOLVED", "ASSIGNED", "FIXED") | |
def make_bug_summary(csv_file_name, output_image, state="RESOLVED"): | |
if state not in _STATES: | |
raise ValueError("Unsupported state {s}".format(s=state)) | |
df = pd.DataFrame.from_csv(csv_file_name) | |
sdf = df[df.bug_status == state] | |
fig, ax = tb.get_fig_axes(dims=(8, 6)) | |
assigned_to = sdf.assigned_to.values | |
user_name = [x.split('@')[0] for x in assigned_to] | |
sdf['user_name'] = user_name | |
sdf.groupby('user_name').user_name.count().plot(kind="barh", ax=ax, color="red", alpha=0.75) | |
ax.set_ylabel("User name") | |
ax.set_xlabel("Number of bugs to Verify") | |
fig.savefig(output_image, dpi=240) | |
return fig, ax |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment