-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
166 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
|
||
import pandas as pd | ||
from matplotlib import pyplot as plt | ||
|
||
os.chdir(os.path.join(os.path.dirname(__file__), os.path.pardir)) | ||
|
||
state = pd.read_csv('ci/cts_state.csv', delimiter=';') | ||
counts = state.groupby('status').agg(count=('suite', 'size'))['count'].to_dict() | ||
|
||
labels = ['passed', 'run failed', 'build failed', 'not applicable'] | ||
colors = ['#4a0', '#fa0', '#e44', '#aaa'] | ||
|
||
plt.rcParams['svg.fonttype'] = 'none' | ||
|
||
fig, ax = plt.subplots(figsize=(8, 0.6)) | ||
left = 0 | ||
for l, c in zip(labels, colors): | ||
n = counts[l] | ||
ax.barh(0, n, left=left, color=c, label=l) | ||
ax.text(left + n/2, 0, str(n), ha='center', va='center', weight='bold') | ||
left += n | ||
ax.set_xlim(0, left) | ||
ax.axis('off') | ||
ax.set_title('SYCL spec conformance by number of CTS categories') | ||
|
||
fig.legend(loc='lower center', ncols=len(labels), | ||
bbox_to_anchor=(0, -0.4, 1, 0.5), frameon=False) | ||
fig.savefig('resources/cts_state.svg', bbox_inches='tight') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.